Merge branch 'main' of github.com:dylanpdx/BetterTwitFix
This commit is contained in:
commit
0f77b2e0a4
1 changed files with 5 additions and 0 deletions
|
@ -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"):
|
||||||
|
|
Loading…
Reference in a new issue