Skip to content

Commit

Permalink
Fixed: Not getting all messages
Browse files Browse the repository at this point in the history
  • Loading branch information
SecretShell committed Nov 24, 2019
1 parent 956c257 commit ef2a4ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,19 @@ def media_scraper(session, site_name, only_links, link, locations, directory, po
b = b * 100
offset_array.append(link.replace("offset=0", "offset=" + str(b)))
if api_type == "Messages":
offset_count = 0
while True:
r = session.get(link)
y = json.loads(r.text)
if "list" in y:
if y["list"]:
offset_array.append(link)
if not y["hasMore"]:
if y["hasMore"]:
offset_count2 = offset_count+100
offset_count = offset_count2-100
link = link.replace("offset=" + str(offset_count), "offset=" + str(offset_count2))
offset_count = offset_count2
else:
break
else:
break
Expand Down

0 comments on commit ef2a4ce

Please sign in to comment.