Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'hasMore' #2116

Open
kayser26 opened this issue Jul 28, 2024 · 9 comments
Open

KeyError: 'hasMore' #2116

kayser26 opened this issue Jul 28, 2024 · 9 comments

Comments

@kayser26
Copy link

hi, i recently updated the scraper and since then i am having the following error:

Traceback (most recent call last):
File "C:\Users\K-Rig-3\Documents\GitHub\UltimaScraper\start_us.py", line 62, in
asyncio.run(main())
File "C:\Users\K-Rig-3\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\K-Rig-3\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\K-Rig-3\Documents\GitHub\UltimaScraper\start_us.py", line 44, in main
_api = await USR.start(
File "C:\Users\K-Rig-3\Documents\GitHub\UltimaScraper\ultima_scraper\ultima_scraper.py", line 50, in start
await self.start_datascraper(datascraper)
File "C:\Users\K-Rig-3\Documents\GitHub\UltimaScraper\ultima_scraper\ultima_scraper.py", line 135, in start_datascraper
final_job_user_list = await datascraper.configure_datascraper_jobs()
File "C:\Users\K-Rig-3\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-0mhZ01bQ-py3.10\lib\site-packages\ultima_scraper_collection\modules\module_streamliner.py", line 109, in configure_datascraper_jobs
chat_users = await self.get_chat_users()
File "C:\Users\K-Rig-3\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-0mhZ01bQ-py3.10\lib\site-packages\ultima_scraper_collection\modules\module_streamliner.py", line 427, in get_chat_users
chats = await authed.get_chats()
File "C:\Users\K-Rig-3\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-0mhZ01bQ-py3.10\lib\site-packages\ultima_scraper_api\apis\onlyfans\classes\auth_model.py", line 255, in get_chats
has_more = results[-1]["hasMore"]
KeyError: 'hasMore'

any suggestions? thank you!

@tedy02
Copy link

tedy02 commented Aug 20, 2024

...anyone have a fix?...

@nilejturn22
Copy link

I don't have a fix but I am getting this error and doing a little debugging I can see that all the requests are returning with 400 errors {'error': {'code': 400, 'message': 'Bad Request'}} for requests https://onlyfans.com/api2/v2/chats?limit=100&offset=0&order=desc Anyone have any insight as to what would be causing this?

@tedy02
Copy link

tedy02 commented Sep 15, 2024

I've been unable to use it for over 2 months

@KYTON06
Copy link

KYTON06 commented Sep 16, 2024

I also have the same problem, any update?

@KingwithQueen
Copy link

I also encountered this problem, and it was the first time I used the script. Does anyone know how to fix it?

@tedy02
Copy link

tedy02 commented Sep 25, 2024

I found the only fix I could do... OFSCRAPER... there is little to no support here... :(

@qwer288
Copy link

qwer288 commented Oct 25, 2024

I don't have a fix but I am getting this error and doing a little debugging I can see that all the requests are returning with 400 errors {'error': {'code': 400, 'message': 'Bad Request'}} for requests https://onlyfans.com/api2/v2/chats?limit=100&offset=0&order=desc Anyone have any insight as to what would be causing this?

You may be able to bypass the issue by modifying line 109 in .venv/lib/python3.11/site-packages/ultima_scraper_collection/modules/module_streamliner.py:
change chat_users = await self.get_chat_users() to chat_users = []
However, I'm not sure if this change will cause you to miss anything important that needs to be downloaded. It works for me so far.

Additionally, after making this change, you may need to update .venv/lib/python3.11/site-packages/ultima_scraper_api/apis/onlyfans/__init__.py to accommodate changes in the media_item structure from the website.

@RandomDude66613
Copy link

You may be able to bypass the issue by modifying line 109 in .venv/lib/python3.11/site-packages/ultima_scraper_collection/modules/module_streamliner.py: change chat_users = await self.get_chat_users() to chat_users = [] However, I'm not sure if this change will cause you to miss anything important that needs to be downloaded. It works for me so far.

Additionally, after making this change, you may need to update .venv/lib/python3.11/site-packages/ultima_scraper_api/apis/onlyfans/__init__.py to accommodate changes in the media_item structure from the website.

Hi, could you please explain how to do the last step and update the python3.11/site-packages/ultima_scraper_api/apis/onlyfans/init.py file? I'm using Windows and currently facing the same issue as this guy #2121 (comment). Thx!

@qwer288
Copy link

qwer288 commented Nov 1, 2024

Sure, here is my modified __init__.py file. You can backup your old file and try this one. init.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants