File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
lambdas/security-newsletter/src Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 77import pytz
88
99
10- TABLE_ARN = os .environ ["DYNAMODB_TABLE_ARN" ]
10+ TABLE_ARN = "none" # os.environ["DYNAMODB_TABLE_ARN"]
1111ARTIFACT_TYPE = "newsletter"
1212
1313# Logging Configuration
@@ -33,11 +33,10 @@ def main(event, _):
3333
3434 logging .info ("Latest articles: %s" , latest_articles )
3535
36- # Extract links from Bleeping Computer articles only
37- bleeping_links = [article ["link" ] for article in latest_articles
38- if "bleepingcomputer.com" in article ["link" ]]
36+ # Extract links from all articles
37+ newsletter_links = [article ["link" ] for article in latest_articles ]
3938
40- return publish_message_to_table (bleeping_links )
39+ return publish_message_to_table (newsletter_links )
4140
4241
4342def get_latest_article_with_timezone (articles , timezone_str = "UTC" ):
@@ -115,3 +114,7 @@ def publish_message_to_table(links: str):
115114 )
116115 logging .info ("Response: %s" , response )
117116 return {"message" : "Message has been logged to DynamoDB!" , "links" : links }
117+
118+ if __name__ == "__main__" :
119+ feed = fetch_bleeping_computer_rss ()
120+ print (feed )
You can’t perform that action at this time.
0 commit comments