Closed darkplace77 closed 1 year ago
+1... Just started seeing this error myself as of today.
Onlyfans updated the way they determine if there are highlights. It's a simple fix, I've already fixed my repo and came here to fix this one but is so massive I can't seem to chase down where to update it at.
See here: https://github.com/DIGITALCRIMINALS/OnlyFans/issues/518#issuecomment-1192966077
Will try this now...
https://github.com/DIGITALCRIMINALS/OnlyFans/issues/518#issuecomment-1227477736 Having the same problem now, sadge
EDIT 1: D:\Data\OnlyFans-7.6.1\apis\onlyfans\classes\create_user.py", line 270, in get_highlights results = [create_highlight(x) for x in results.get("data")] TypeError: 'NoneType' object is not iterable
yeah same issue here :T did those fixes a while ago. checked again and they were still fixed as recommended. same issues.
Likewise. I made the changes awhile ago, but now I'm getting the same error.
https://github.com/DIGITALCRIMINALS/OnlyFans/issues/518#issuecomment-1227477736 Having the same problem now, sadge EDIT 1: D:\Data\OnlyFans-7.6.1\apis\onlyfans\classes\create_user.py", line 270, in get_highlights results = [create_highlight(x) for x in results.get("data")]
This fixed this same issue weeks ago.
TypeError: 'NoneType' object is not iterable
This breaks the script if you add it as you said.
Also, you aren't on the latest commit because "\apis\onlyfans\classes\create_user.py" doesn't exist anymore. It's "apis\onlyfans\classes\user_model.py". Ln 283
I've sent a quick PR.
Depending on your skill level, grab the patch from the PR and apply it.
Or just replace your file apis/onlyfans/classes/user_model.py with this one https://raw.githubusercontent.com/DIGITALCRIMINALS/OnlyFans/ee736bb44dab23204f9adf3f23cec631c448dd1b/apis/onlyfans/classes/user_model.py
Or wait for the PR to be merged.
To be clear the fix is just modifying apis/onlyfans/classes/user_model.py
line 283 and replace results["data"]]
with results["list"]]
To be clear the fix is just modifying
apis/onlyfans/classes/user_model.py
line 283 and replaceresults["data"]]
withresults["list"]]
results.get("list")] did work for me, so thank you for the quick work!
The question I have is... what changed? I'm still running the exact same code I was running yesterday.
Did something change on OF's side, or did something change in our dynamically loaded files?
The question I have is... what changed? I'm still running the exact same code I was running yesterday.
Did something change on OF's side, or did something change in our dynamically loaded files?
OF changed the way it returns results of its API regarding stories.
To be clear the fix is just modifying
apis/onlyfans/classes/user_model.py
line 283 and replaceresults["data"]]
withresults["list"]]
What's the change for those running the latest official release (v7.6.1)? Is it still a change in apis/onlyfans/classes/create_user.py as was the case in https://github.com/DIGITALCRIMINALS/OnlyFans/issues/518#issuecomment-1227477736?
The question I have is... what changed? I'm still running the exact same code I was running yesterday. Did something change on OF's side, or did something change in our dynamically loaded files?
OF changed the way it returns results of its API regarding stories.
Got it. Thank you!
The question I have is... what changed? I'm still running the exact same code I was running yesterday. Did something change on OF's side, or did something change in our dynamically loaded files?
OF changed the way it returns results of its API regarding stories.
Is there a means by which you can avoid scraping stories? All options will automatically start by scraping stories, resulting in errors.
it seems like setting the api choice has resolved this and many other issues.
launch your config file and find these lines under onlyfans supported
"settings": { "auto_profile_choice": "1", "auto_model_choice": false, "auto_media_choice": "2,3,4,5,6,7", "auto_api_choice": "2,3,4,5,6,7", "browser": { "auth": true },
you dont have to set auto profile or media choice.
To be clear the fix is just modifying
apis/onlyfans/classes/user_model.py
line 283 and replaceresults["data"]]
withresults["list"]]
What's the change for those running the latest official release (v7.6.1)? Is it still a change in apis/onlyfans/classes/create_user.py as was the case in #518 (comment)?
Same fix but its on line 270 instead and the file is apis\onlyfans\classes\create_user.py :)
it seems like setting the api choice has resolved this and many other issues.
launch your config file and find these lines under onlyfans supported
"settings": { "auto_profile_choice": "1", "auto_model_choice": false, "auto_media_choice": "2,3,4,5,6,7", "auto_api_choice": "2,3,4,5,6,7", "browser": { "auth": true },
you dont have to set auto profile or media choice.
you are an awesome person, thank you
I am also getting
File "D:\OnlyFans DataScraper\apis\onlyfans\classes\create_user.py", line 270, in get_highlights results = [create_highlight(x) for x in results.get("data")] TypeError: 'NoneType' object is not iterable
not sure what to do. I am running 7.6.1 but with for x in results.get("data") added to the correct file by hand.
because of this I am not sure I want the up to date version https://github.com/DIGITALCRIMINALS/OnlyFans/issues/447
I'm going to try moving all my prior rips, then downloading the current branch of this repo.
edit: I noticed https://github.com/DIGITALCRIMINALS/OnlyFans/issues/606#issuecomment-1228024483 I did https://github.com/DIGITALCRIMINALS/OnlyFans/issues/606#issuecomment-1228024483 and now 7.6.1 is working with that alteration to line 270
thanks all.
To be clear the fix is just modifying
apis/onlyfans/classes/user_model.py
line 283 and replaceresults["data"]]
withresults["list"]]
I don't have that file in 7.6.1. Should I be worried? Here's what I have in ..\classes\
init.py 1KB 12/3/2021 9:44 AM
create_auth.py 18KB 12/3/2021 9:44 AM
create_highlight.py 1KB 12/3/2021 9:44 AM
create_message.py 4KB 12/3/2021 9:44 AM
create_post.py 4KB 12/3/2021 9:44 AM
create_story.py 2KB 12/3/2021 9:44 AM
create_user.py 25KB 12/3/2021 9:44 AM
extras.py 9KB 12/3/2021 9:44 AM
EDIT: for version 7.6.1 use the file create_user.py.
The file create_user.py on line 270 doesn't have that text. It has:
Can you please confirm?
EDIT: in version 7.6.1, change line 270 from what it is above to this: results = [create_highlight(x) for x in results.get("list")]
The file create_user.py on line 270 doesn't have that text. It has:
Can you please confirm?
EDIT: in version 7.6.1, change line 270 from what it is above to this: results = [create_highlight(x) for x in results.get("list")]
This worked for me.
Bump, I fixed the issue with stories not downloading, same PR #605
Not sure how to deliver changes to people not familiar with Git and Github, you could grab the zip from my branch: https://github.com/eclipseo/OnlyFans/archive/refs/heads/fix_api.zip
Or grab the 3 files I have modified (download and copy the raw to the right place, for the latest code only, not the release!)
https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/story_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/user_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api//modules/onlyfans.py
Hope this get merged soon.
Processing Scraped Messages
0%| | 0/522 [00:00<?, ?it/s]Traceback (most recent call last):
File "E:\XXX\,,,OFN\start_ofd.py", line 66, in <module>
asyncio.run(main())
File "C:\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "E:\XXX\,,,OFN\start_ofd.py", line 52, in main
api = await main_datascraper.start_datascraper(config, site_name)
File "E:\XXX\,,,OFN\datascraper\main_datascraper.py", line 131, in start_datascraper
await default(datascraper)
File "E:\XXX\,,,OFN\datascraper\main_datascraper.py", line 101, in default
await main_helper.process_jobs(datascraper, subscription_list, site_settings)
File "E:\XXX\,,,OFN\helpers\main_helper.py", line 1026, in process_jobs
await datascraper.start_datascraper(authed, subscription.username)
File "E:\XXX\,,,OFN\modules\module_streamliner.py", line 84, in start_datascraper
await self.prepare_scraper(subscription, content_type)
File "E:\XXX\,,,OFN\modules\module_streamliner.py", line 260, in prepare_scraper
await self.process_scraped_content(master_set, content_type, subscription)
File "E:\XXX\,,,OFN\modules\module_streamliner.py", line 288, in process_scraped_content
unrefined_set = await tqdm.gather(*tasks, **settings)
File "C:\Python\Python310\lib\site-packages\tqdm\asyncio.py", line 79, in gather
res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout,
File "C:\Python\Python310\lib\site-packages\tqdm\asyncio.py", line 79, in <listcomp>
res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout,
File "C:\Python\Python310\lib\asyncio\tasks.py", line 575, in _wait_for_one
return f.result() # May raise f.exception().
File "C:\Python\Python310\lib\site-packages\tqdm\asyncio.py", line 76, in wrap_awaitable
return i, await f
File "E:\XXX\,,,OFN\modules\onlyfans.py", line 138, in media_scraper
preview_link = media["files"]["preview"]["url"]
KeyError: 'url'
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000027B21CFAB90>
Traceback (most recent call last):
File "C:\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
self._check_closed()
File "C:\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Getting a similar error but with messages?
how have you iinstalled this "patch"?
I swapped all three files, yes
I swapped all three files, yes
Try with these link instead, I might have pasted the wrong commit. However this is only if you use the latest code, not the release version.
https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/story_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/user_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api//modules/onlyfans.py
As a complete programming noob, which is the "latest version"? I imagine the master is the release.
EDIT: If the master is the latest version, then I've always been using this, not the releases. Anyhow, tried your links, still the same result sadly.
As a complete programming noob, which is the "latest version"? I imagine the master is the release.
Here you got the released versions: https://github.com/DIGITALCRIMINALS/OnlyFans/releases 7.6.1 is the latest one.
But there has been changes to the code that has not been in a release yet, this code is located in the "master" branch. You can get it by clicking the green Code button, then Download ZIP:
Another is to download the entire code with fixes I made directly from here https://github.com/eclipseo/OnlyFans/archive/refs/heads/fix_api.zip It contains the master code + the fix already.
So again, that's what I've always used. And I applied your fix by swapping the files. Still not working sadly.
EDIT Used the "fix_api" version, still getting the same error. If it helps, it doesn't happen with every model.
Do you have a name of a model it doesn't work with?
ivygehennanoppv
I tried with her and can not repro the issue.
Could you use this file https://gist.githubusercontent.com/eclipseo/8c499b2a75b0326aadbe4f9d66a1afae/raw/819fb2ea519be7dbd30a6d8418c02cb0fe9b0a7f/onlyfans.py instead and send me the output of the command so I can diagnose it? W/ only one model please.
The full output? This is going to be pretty long, should I post it here or is there some other way to do it?
EDIT: I found a common denominator although I'd prefer not to share it publicly if possible? Is there any way to let you know otherwise?
EDIT 2: I can't send you the output cause after I swapped to your version of onlyfans.py, the output is a wall of text and by the time the script crashes, not everything is displayed
I swapped all three files, yes
Try with these link instead, I might have pasted the wrong commit. However this is only if you use the latest code, not the release version.
https://github.com/eclipseo/OnlyFans/blob/master/apis/onlyfans/classes/story_model.py https://github.com/eclipseo/OnlyFans/blob/master/apis/onlyfans/classes/user_model.py https://github.com/eclipseo/OnlyFans/blob/master/modules/onlyfans.py
aren't those the original files, not the changed ones?
It seems so
On Sat, 3 Sept 2022, 18:35 Egon099, @.***> wrote:
I swapped all three files, yes
Try with these link instead, I might have pasted the wrong commit. However this is only if you use the latest code, not the release version.
https://github.com/eclipseo/OnlyFans/blob/master/apis/onlyfans/classes/story_model.py https://github.com/eclipseo/OnlyFans/blob/master/apis/onlyfans/classes/user_model.py https://github.com/eclipseo/OnlyFans/blob/master/modules/onlyfans.py
isn't user_model.py line 283 still wrong on that link?
— Reply to this email directly, view it on GitHub https://github.com/DIGITALCRIMINALS/OnlyFans/issues/604#issuecomment-1236160696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIBFSD36VI73BQCZKAUSH3V4N45PANCNFSM57TWYRNA . You are receiving this because you commented.Message ID: @.***>
This is the wrong links, I'm not near a computer right now to fix it, sorry
On Sat, 3 Sept 2022, 19:19 Bob Mauchin, @.***> wrote:
It seems so
On Sat, 3 Sept 2022, 18:35 Egon099, @.***> wrote:
I swapped all three files, yes
Try with these link instead, I might have pasted the wrong commit. However this is only if you use the latest code, not the release version.
https://github.com/eclipseo/OnlyFans/blob/master/apis/onlyfans/classes/story_model.py https://github.com/eclipseo/OnlyFans/blob/master/apis/onlyfans/classes/user_model.py https://github.com/eclipseo/OnlyFans/blob/master/modules/onlyfans.py
isn't user_model.py line 283 still wrong on that link?
— Reply to this email directly, view it on GitHub https://github.com/DIGITALCRIMINALS/OnlyFans/issues/604#issuecomment-1236160696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIBFSD36VI73BQCZKAUSH3V4N45PANCNFSM57TWYRNA . You are receiving this because you commented.Message ID: @.***>
I used the full master + fix zip file, unless that has the wrong files in it as well, it's not an issue. The common denominator for all models that are not working for me is that I've sent video files to them via DM. If you have any model you've chatted with and sent her any vids, please try that.
Yeah I don't send vid to people, but if anyone want to get me the output of the file in the gist I sent before, it will be a big help.
I need to see the output of what it does on media's uploaded by some of you. Just put it on a Pastebin on I'll dig through it when I get back home.
On Sat, 3 Sept 2022, 19:27 otisrush, @.***> wrote:
I used the full master + fix zip file, unless that has the wrong files in it as well, it's not an issue. The common denominator for all models that are not working for me is that I've sent video files to them via DM. If you have any model you've chatted with and sent her any vids, please try that.
— Reply to this email directly, view it on GitHub https://github.com/DIGITALCRIMINALS/OnlyFans/issues/604#issuecomment-1236168393, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIBFSBDDFADDPW4JQTG77TV4ODAZANCNFSM57TWYRNA . You are receiving this because you commented.Message ID: @.***>
Ok,if we skip these files, then
https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/story_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/user_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api//modules/onlyfans.py
should work, or:
https://github.com/eclipseo/OnlyFans/archive/refs/heads/fix_api.zip
should work too.
Traceback (most recent call last):
File "E:\XXX\,,,OFN\start_ofd.py", line 9, in <module>
from helpers.main_helper import OptionsFormat
File "E:\XXX\,,,OFN\helpers\main_helper.py", line 44, in <module>
from modules.onlyfans import OnlyFansDataScraper
File "E:\XXX\,,,OFN\modules\onlyfans.py", line 138
if "preview" in media["files"] and "url" in media["files"]["preview"]
^
SyntaxError: expected ':'
Traceback (most recent call last): File "E:\XXX\,,,OFN\start_ofd.py", line 9, in <module> from helpers.main_helper import OptionsFormat File "E:\XXX\,,,OFN\helpers\main_helper.py", line 44, in <module> from modules.onlyfans import OnlyFansDataScraper File "E:\XXX\,,,OFN\modules\onlyfans.py", line 138 if "preview" in media["files"] and "url" in media["files"]["preview"] ^ SyntaxError: expected ':'
Traceback (most recent call last): File "E:\XXX\,,,OFN\start_ofd.py", line 9, in <module> from helpers.main_helper import OptionsFormat File "E:\XXX\,,,OFN\helpers\main_helper.py", line 44, in <module> from modules.onlyfans import OnlyFansDataScraper File "E:\XXX\,,,OFN\modules\onlyfans.py", line 138 if "preview" in media["files"] and "url" in media["files"]["preview"] ^ SyntaxError: expected ':'
yeah sorry, updated in the meanwhile:
https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/story_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api/apis/onlyfans/classes/user_model.py https://raw.githubusercontent.com/eclipseo/OnlyFans/fix_api//modules/onlyfans.py
or
https://github.com/eclipseo/OnlyFans/archive/refs/heads/fix_api.zip
That's assuming your don't wanna save your own videos, I can't really test it myself, as i never sent a video to a content creator.
working like a charm now :) thank you for the help!
https://pastebin.com/ here you go
Could you open this link and tell me if this is a video you uploaded? I'll try not to save your own videos you sent to content creator I think. could you please remove the link? this whole reply if possible
Removed but only you can access it anyway. I can't, that's why I asked it it was one of your upload
ah, that's ok. still tho, better safe than sorry
I downloaded your repo with the fix already applied. I don't get the previous error anymore, but now when I select a model, and choose media type, it creates the folders, downloads nothing and immediately after asks for the media type to download of a different model. and this continues on
Yeah, so, the master branch, the creating of folders downloading nothing and then moving on to the next model? That's the behavior I saw here (where these new folders nuke/delete prior contents) https://github.com/DIGITALCRIMINALS/OnlyFans/issues/447
Which is why I'm still using 7.6.1 with as few handmade update/corrections/patches as possible. Something is deeply wrong in between 7.6.1 and the master that renders it not only useless but destructive and harmful :(
Yeah, so, the master branch, the creating of folders downloading nothing and then moving on to the next model? That's the behavior I saw here (where these new folders nuke/delete prior contents) #447
Which is why I'm still using 7.6.1 with as few handmade update/corrections/patches as possible. Something is deeply wrong in between 7.6.1 and the master that renders it not only useless but destructive and harmful :(
THIS, this is VERY annoying and needs to be fixed @DIGITALCRIMINALS , pllllleeeease.
I don't know why it's nuking files. To even attempt to fix this, I'd need the scraper settings, model database and content, and OnlyFans cookie data to, hopefully recreate the issue.
If you want to help, you can just email me.
I downloaded your repo with the fix already applied. I don't get the previous error anymore, but now when I select a model, and choose media type, it creates the folders, downloads nothing and immediately after asks for the media type to download of a different model. and this continues on
same exact thing is happening to me.
I downloaded your repo with the fix already applied. I don't get the previous error anymore, but now when I select a model, and choose media type, it creates the folders, downloads nothing and immediately after asks for the media type to download of a different model. and this continues on
That's the behavior I always got. The problem is how the message content is handled I believe. It goes through all messages, even model you haven't selected and then it starts downloading.