UltimaHoarder / UltimaScraper

Scrape all the media from an OnlyFans account - Updated regularly
GNU General Public License v3.0
3.88k stars 611 forks source link

AttributeError: 'AuthModel' object has no attribute 'auth_details'. Did you mean: 'get_auth_details'? #2069

Open maddock34 opened 5 months ago

maddock34 commented 5 months ago

Title is the error returned when running the python script. I can guarantee my cookies and things like that are correct. Here is the full error;

File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-c449YzLd-py3.11\Lib\site-packages\ultima_scraper_collection\modules\module_streamliner.py", line 415, in account_setup auth.auth_details.email ^^^^^^^^^^^^^^^^^ AttributeError: 'AuthModel' object has no attribute 'auth_details'. Did you mean: 'get_auth_details'?

I go in and change the line to include "get_auth_details" and I get the following error;

File "C:\Users\USERNAME\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-c449YzLd-py3.11\Lib\site-packages\ultima_scraper_collection\modules\module_streamliner.py", line 415, in account_setup auth.get_auth_details.email AttributeError: 'function' object has no attribute 'email'

I have also entered my email and pass into the auth.json just to see if that made a difference. It didn't.

That's about as far as my troubleshhoting goes because I'm not that smart

jlandgrebe-guardian commented 5 months ago

I'm experiencing the same issue down to the error message. Was working about a month ago

see-spot-run commented 5 months ago

Same issue here!

vortega1004 commented 5 months ago

Got the same issue so I did some digging. The else-if statement is being executed at line 415 is because the authentication to the site was not successful and (I believe) it is trying to use your email/username to authenticate instead. In auth_model.py, auth_details.email was never set so its possibly returning a Nonetype and failing. I can't seem to find the get_auth_details() method in the class so maybe its failing there somewhere.

image

I get this issue when I set active to true in the auth.json file and since it's been a while since I used the scrapper so I ran the updater.

I noticed that my auth.json file is also getting changed. My id being set to Null and active reverting back to false. I found the update() method in auth_model.py was causing this at some point. Because the auth failed the user.Id is returning Null which is what the json file updated to. kind've annoying.

image

image

I'm going to do more digging another time. I need to setup my IDE to properly inspect everything.

BathingGorilla commented 5 months ago

Same issue here. Anyone figure this out?

herefromrdt commented 5 months ago

It's definitely caused by auth failures. For me, it keeps getting Bad Request responses from OF. Unfortunately, the response from OF doesn't contain an error message beyond "Bad Request". My current theory is that the sign header might no longer be correct. When I log into OF, I get a different format than is specified in the dynamic-rules file. (file has 13190:{}:{:x}:653286c6, but in my browser, it starts with 17969 and ends with 65aadc5b). That said, there seem to be other people who are successfully authenticating, and I would think a bad sign format would affect everyone, so I'm really not sure

BathingGorilla commented 5 months ago

Weird, I've tried both Firefox and Chromium based auth and I get the same results with both.

jlandgrebe-guardian commented 5 months ago

I was able to get a working scraper using datawhores OF-Scraper https://github.com/datawhores/OF-Scraper The first few times I tried manually entering the cookies and login information which threw auth errors - after using their cookie helper extension the auth went through. Haven't had a chance to try the cookie helper (firefox only) with this code yet, but might be worth a shot.

I think I'll be using their code from now on anyways because it has more documentation and has CDM for encrypted content scraping

see-spot-run commented 5 months ago

I was able to get a working scraper using datawhores OF-Scraper https://github.com/datawhores/OF-Scraper The first few times I tried manually entering the cookies and login information which threw auth errors - after using their cookie helper extension the auth went through. Haven't had a chance to try the cookie helper (firefox only) with this code yet, but might be worth a shot.

I think I'll be using their code from now on anyways because it has more documentation and has CDM for encrypted content scraping

This fork totally worked for me! I can now login and scrape all content like I could before. Thanks for suggesting @jlandgrebe-guardian

khimoc97 commented 5 months ago

I was able to get a working scraper using datawhores OF-Scraper https://github.com/datawhores/OF-Scraper The first few times I tried manually entering the cookies and login information which threw auth errors - after using their cookie helper extension the auth went through. Haven't had a chance to try the cookie helper (firefox only) with this code yet, but might be worth a shot.

I think I'll be using their code from now on anyways because it has more documentation and has CDM for encrypted content scraping

Thanks, been struggled with UltimaScrapper recently with this issue

m-a-x-c commented 4 months ago

Has this issue been resolved? I am encountering the same problem.

MalcolmFFS commented 3 months ago

Changing the dynamic-rules as suggested in https://github.com/UltimaHoarder/UltimaScraper/issues/2061 is a stopgap for me, but changes the issue to Messages throwing an error when parsing. Might be worth trying for anyone here, but has it's own issues that I don't expect would get dug into.

hawktank commented 2 months ago

Was having the same issue - make sure you're using python 3.10.xx - the app doesn't officially support the newer versions.

Fresh clone of UltimaScript (backup any existing sites first) - rename the existing folder to be extra safe.

I only use UltimaScraper with poetry, so I deleted the poetry Cache folder at: %USERPROFILE%\AppData\Local\pypoetry

Update the config.json:

Make these changes to config.json "dynamic_rules_link": "https://raw.githubusercontent.com/DIGITALCRIMINALS/dynamic-rules/main/onlyfans.json", TO "dynamic_rules_link": "https://raw.githubusercontent.com/DATAHOARDERS/dynamic-rules/main/onlyfans.json",

set "messages": false, inside of Onlyfans and Fansly

Update the auth.json for OnlyFans: Use the latest cookie info from a fresh Chrome OnlyFans login from DevTools > Network. Search for "api" and refresh the page. Look for the item me - you can also look for onlyfans.com (x_bc is only inside of me though).

Set "active": true

Re-run python updater.py

Then poetry run python start_us.py to start er up!

AgentBlue14 commented 2 months ago

@hawktank this worked for me! Thanks!

djmarioka commented 3 weeks ago

Was having the same issue - make sure you're using python 3.10.xx - the app doesn't officially support the newer versions.

Fresh clone of UltimaScript (backup any existing sites first) - rename the existing folder to be extra safe.

I only use UltimaScraper with poetry, so I deleted the poetry Cache folder at: %USERPROFILE%\AppData\Local\pypoetry

Update the config.json:

Make these changes to config.json "dynamic_rules_link": "https://raw.githubusercontent.com/DIGITALCRIMINALS/dynamic-rules/main/onlyfans.json", TO "dynamic_rules_link": "https://raw.githubusercontent.com/DATAHOARDERS/dynamic-rules/main/onlyfans.json",

set "messages": false, inside of Onlyfans and Fansly

Update the auth.json for OnlyFans: Use the latest cookie info from a fresh Chrome OnlyFans login from DevTools > Network. Search for "api" and refresh the page. Look for the item me - you can also look for onlyfans.com (x_bc is only inside of me though).

Set "active": true

Re-run python updater.py

Then poetry run python start_us.py to start er up!

Hi,

I've followed this advice, but it continues failing for me, it's in an endless loop, and nothing happens:

image

Could anybody help me?

Thanks