Merge branch 'main' of github.com:dylanpdx/BetterTwitFix

This commit is contained in:
Dylan 2022-06-01 19:26:22 +00:00
commit 0f77b2e0a4

View file

@ -116,6 +116,11 @@ def genImageFromURL(urlArray):
return finalImg return finalImg
def lambda_handler(event, context): def lambda_handler(event, context):
if ("queryStringParameters" not in event):
return {
"statusCode": 400,
"body": "Invalid request."
}
images = event["queryStringParameters"].get("imgs","").split(",") images = event["queryStringParameters"].get("imgs","").split(",")
for img in images: for img in images:
if not img.startswith("https://pbs.twimg.com"): if not img.startswith("https://pbs.twimg.com"):