Skip to content

Commit

Permalink
Always https for ptpimg urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Nov 23, 2024
1 parent 12cb2bd commit 41548a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ async def check_and_collect(image_dict):
if not img_url:
return None

if "ptpimg.me" in img_url and img_url.startswith("http://"):
img_url = img_url.replace("http://", "https://")
image_dict['raw_url'] = img_url
image_dict['web_url'] = img_url

# Verify the image link
if await self.check_image_link(img_url):
# Check if the image is hosted on an approved image host
Expand Down

0 comments on commit 41548a4

Please sign in to comment.