Skip to content

Commit

Permalink
Potential fix for "filename"
Browse files Browse the repository at this point in the history
lmao :/
  • Loading branch information
UltimaHoarder committed Mar 6, 2021
1 parent 04882f6 commit 50b0529
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions modules/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,11 +1069,19 @@ def media_scraper(results, api: start, subscription: create_subscription, format
v = getattr(v, api_type, [])
if v:
for post in v:
medias = post.get("medias",[])
medias = post.get("medias", [])
if not medias:
medias = post.get("media",[])
found_medias = [x for x in medias
if x["filename"] == new_media["filename"]]
medias = post.get("media", [])
found_medias = []
for temp_media in medias:
temp_filename = temp_media.get("filename")
if temp_filename:
if temp_filename == new_media["filename"]:
found_medias.append(temp_media)
else:
print
# found_medias = [x for x in medias
# if x["filename"] == new_media["filename"]]
if found_medias:
for found_media in found_medias:
found_media["linked"] = api_type
Expand Down

1 comment on commit 50b0529

@olivechicago
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to have worked

Please sign in to comment.