From ef2a4ceb22d8164885fc62519cb4f4516f4d8577 Mon Sep 17 00:00:00 2001 From: CRIMINAL Date: Sun, 24 Nov 2019 13:30:14 +0000 Subject: [PATCH] Fixed: Not getting all messages --- modules/onlyfans.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/onlyfans.py b/modules/onlyfans.py index 46bba21ff..47cbf0094 100644 --- a/modules/onlyfans.py +++ b/modules/onlyfans.py @@ -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