"Missing x Posts" increases forever
I'm seeing this error occasionally. It doesn't happen for every model, but when it happens it gets "stuck" on a model. It will come and go seemingly at random though. All the other models can scrape on the first try but this would still show up (that makes me think it's not just a slowness issue with OF).
The number of missing posts keeps increasing forever until the script segfaults or I ctrl+c.
Name: louiselou
Type: Profile
0.00B [00:00, ?B/s]
Type: Stories
Scraping [photo]. Should take less than a minute.
Scraping [photo]. Should take less than a minute.
Scraping [video | stream | gif]. Should take less than a minute.
Scraping [audio]. Should take less than a minute.
Scraping [text]. Should take less than a minute.
Scraping [video | stream | gif]. Should take less than a minute.
Scraping [audio]. Should take less than a minute.
Scraping [text]. Should take less than a minute.
Processing metadata.
Finished processing metadata.
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Renaming files.
Type: Posts
Scrape Attempt: 1/100
Missing 100 Posts... Retrying...
Scrape Attempt: 2/100
Missing 100 Posts... Retrying...
Scrape Attempt: 3/100
Missing 200 Posts... Retrying...
Scrape Attempt: 4/100
Missing 266 Posts... Retrying...
Scrape Attempt: 5/100
Missing 400 Posts... Retrying...
Scrape Attempt: 6/100
Missing 640 Posts... Retrying...
Scrape Attempt: 7/100
Missing 1066 Posts... Retrying...
Scrape Attempt: 8/100
Missing 1828 Posts... Retrying...
Scrape Attempt: 9/100
Missing 3200 Posts... Retrying...
Scrape Attempt: 10/100```
I believe that's OF's website timing out. Mine often stalls at attempt 17 for some reason
When it's an issue with OF being slow or timing out, the number of missing posts counts down and works like you'd expect. I've seen that also, and it's a different scenario IMO. This is when the number of missing posts keeps increasing.
I have also noticed this exact problem recently, the missing posts always count up and then stop at about the 16th or 17th scrape attempt. Not sure why. It happens on some models' profiles and doesn't on others. Deleted the folder structure and retried and same result.
Yeah, it's a weird math issue with how I do retries.
This usually occurs when OF is slow. Sometimes the script can't get 100 posts at a time so the script automatically halves the requests. 100 posts turn into 50 posts, and if the request doesn't work, it turns into 25 posts, etc.
OK, I went through a bunch of logs to double check. It looks like I was mistaken in thinking that "counting up" and "counting down" were two different scenarios. I found examples where it first counts up, then eventually counts down and finishes:
0.00B [00:00, ?B/s]
Type: Stories
Scraping [photo]. Should take less than a minute.
Scraping [video | stream | gif]. Should take less than a minute.
Scraping [audio]. Should take less than a minute.
Scraping [text]. Should take less than a minute.
Processing metadata.
Finished processing metadata.
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Renaming files.
Type: Posts
Scrape Attempt: 1/100
Missing 200 Posts... Retrying...
Scrape Attempt: 2/100
Missing 200 Posts... Retrying...
Scrape Attempt: 3/100
Missing 400 Posts... Retrying...
Scrape Attempt: 4/100
Missing 533 Posts... Retrying...
Scrape Attempt: 5/100
Missing 800 Posts... Retrying...
Scrape Attempt: 6/100
Missing 760 Posts... Retrying...
Scrape Attempt: 7/100
Missing 250 Posts... Retrying...
Scrape Attempt: 8/100
Missing 214 Posts... Retrying...
Scrape Attempt: 9/100
Missing 187 Posts... Retrying...
Scrape Attempt: 10/100
Missing 166 Posts... Retrying...
But that doesn't mean that this process doesn't have some kind of runaway bug? Here's an example which goes up to 4 million before segfaulting (out of memory):
Scrape Attempt: 1/100
Missing 100 Posts... Retrying...
Scrape Attempt: 2/100
Missing 100 Posts... Retrying...
Scrape Attempt: 3/100
Missing 200 Posts... Retrying...
Scrape Attempt: 4/100
Missing 266 Posts... Retrying...
Scrape Attempt: 5/100
Missing 400 Posts... Retrying...
Scrape Attempt: 6/100
Missing 640 Posts... Retrying...
Scrape Attempt: 7/100
Missing 1066 Posts... Retrying...
Scrape Attempt: 8/100
Missing 1828 Posts... Retrying...
Scrape Attempt: 9/100
Missing 3200 Posts... Retrying...
Scrape Attempt: 10/100
Missing 5688 Posts... Retrying...
Scrape Attempt: 11/100
Missing 10240 Posts... Retrying...
Scrape Attempt: 12/100
Missing 18618 Posts... Retrying...
Scrape Attempt: 13/100
Missing 34133 Posts... Retrying...
Scrape Attempt: 14/100
Missing 63015 Posts... Retrying...
Scrape Attempt: 15/100
Missing 117028 Posts... Retrying...
Scrape Attempt: 16/100
Missing 218453 Posts... Retrying...
Scrape Attempt: 17/100
Missing 409600 Posts... Retrying...
Scrape Attempt: 18/100
Missing 771011 Posts... Retrying...
Scrape Attempt: 19/100
Missing 1456355 Posts... Retrying...
Scrape Attempt: 20/100
Missing 2579363 Posts... Retrying...
Scrape Attempt: 21/100
Missing 4595305 Posts... Retrying...
This is extremely anecdotal, but it seems like that "runaway" issue still happens when OF is not being slow, when I can scrape 50 other models w/o retries and then one goes nuts.
If it's reproducible at all I'll try to get some more info, otherwise we'll just chalk it up to OF issue.
I've having the same issue with one model. It consistantly happens every time, and strted a few days ago.
Name: ashleytea
Type: Profile
0.00B [00:00, ?B/s]
Type: Stories
No Stories Found.
Type: Posts
Scrape Attempt: 1/100
Missing 100 Posts... Retrying...
Scrape Attempt: 2/100
Missing 100 Posts... Retrying...
Scrape Attempt: 3/100
Missing 200 Posts... Retrying...
Scrape Attempt: 4/100
Missing 266 Posts... Retrying...
Scrape Attempt: 5/100
Missing 400 Posts... Retrying...
Scrape Attempt: 6/100
Missing 640 Posts... Retrying...
Scrape Attempt: 7/100
Missing 1066 Posts... Retrying...
Seeing this issue now after i updated to the latest version ... Unsure how to resolve.
Same thing for me. Usually it would go away eventually but still happening after a few days. I tried blacklisting the names with issues but that's not working either.
Getting same thing on several profiles.
same issue for me in the last two days
Because it isn't super consistent, it's a been hard to pin down, but I might have an idea. I think it only happens on models with a lot of Posts. When trying to compare to a working model, I noticed one of the differences is the API calls differ in their limit parameter. "Working" models have a limit of 100 and "broken" models have a limit of 10. I think this is set in https://github.com/DIGITALCRIMINAL/OnlyFans/blob/master/apis/onlyfans/onlyfans.py#L291-L292.
I think the math that handles how many posts are left scrape is hardcoded to 100? @DIGITALCRIMINAL do you remember if the 100 on that line is for the limit or some other magic number? If the logic there is supposed to be missing posts = number of bad requests * (posts per scrape / current scrape attempt) then I can see how "posts per scrape" not matching would throw off the math.
I'll try running with this patch for awhile just to validate my hypothesis:
diff --git a/apis/api_helper.py b/apis/api_helper.py
index d291161..fcfe17e 100644
--- a/apis/api_helper.py
+++ b/apis/api_helper.py
@@ -12,6 +12,7 @@ from multiprocessing.dummy import Pool as ThreadPool
from itertools import product
from os.path import dirname as up
import threading
+import re
path = up(up(os.path.realpath(__file__)))
@@ -263,6 +264,8 @@ def scrape_check(links, session_manager: session_manager, api_type):
print("Scrape Attempt: "+str(attempt+1)+"/"+str(max_attempts))
if not links:
continue
+ limitMatch = re.search("limit=(\d+)", links[0])
+ limit = int(limitMatch.group(1)) if limitMatch else 100
items = assign_session(links, session_manager.sessions)
pool = multiprocessing()
results = pool.starmap(multi, product(
@@ -276,7 +279,7 @@ def scrape_check(links, session_manager: session_manager, api_type):
if count < 2:
break
attempt = attempt if attempt > 1 else attempt + 1
- num = int(len(faulty)*(100/attempt))
+ num = int(len(faulty)*(limit/attempt))
split_by = 2
print("Missing "+str(num)+" Posts... Retrying...")
links = restore_missing_data(
Here's a (different?) cause for this: For louiselou the result set before the "fauly" result contains the first post. So it looks to me that the "faulty" result (which is an empty array) is the API not failing, but saying "there are no more posts left." This results in the script thinking there are some missing when there aren't.

Still happening with e83fb07, it stalled on /shayrivers
This happens on a expired model for me. All other models are fine
Here's a (different?) cause for this: For
louiselouthe result set before the "fauly" result contains the first post. So it looks to me that the "faulty" result (which is an empty array) is the API not failing, but saying "there are no more posts left." This results in the script thinking there are some missing when there aren't.![]()
Thanks, everyone can try the latest commit.
Testing now.
Can you let me know how to move where "linked_" is in a filename? It's messing up my current naming convention.
Testing now on Raspbian and still getting the behavior on creators with a high post count, like hannahblakeuk and sophiasmithuk.
Testing now on Raspbian and still getting the behavior on creators with a high post count, like hannahblakeuk and sophiasmithuk.
If it's not counting upwards, then it's working as intended
Latest commit has been working for me, and the code changes make sense, so I'm happy to mark this as fixed, thanks!
This problem is back for me...