DIGITALCRIMINAL / ArchivedUltimaScraper

Scrape content from OnlyFans and Fansly
GNU General Public License v3.0
948 stars 39 forks source link

[FANSLY] Json Fetch Error when account has 0 messages #132

Closed raise-thine-donger closed 2 years ago

raise-thine-donger commented 2 years ago

Expected Behavior

Run start_ofd.py -> Choose Fansly -> Choose Fansly Account-> Choose subscription -> Pick Content -> Download

Actual Behavior

Run start_ofd.py -> Choose Fansly -> Choose Fansly Account-> Choose subscription -> Pick Content -> crash The crash occurs when processing API Type "Messages"

Stack Trace upon Crash

Type: Messages Traceback (most recent call last): File "\WORKING_DIRECTORY\OnlyFans-7.6\start_ofd.py", line 104, in asyncio.run(main()) File "C:\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "\WORKING_DIRECTORY\OnlyFans-7.6\start_ofd.py", line 86, in main api = await main_datascraper.start_datascraper( File "\WORKING_DIRECTORY\OnlyFans-7.6\datascraper\main_datascraper.py", line 156, in start_datascraper await main_helper.process_names( File "\WORKING_DIRECTORY\OnlyFans-7.6\helpers\main_helper.py", line 963, in process_names result = await module.start_datascraper(authed, username, site_name) File "\WORKING_DIRECTORY\OnlyFans-7.6\modules\fansly.py", line 160, in start_datascraper await prepare_scraper(authed, site_name, item) File "\WORKING_DIRECTORY\OnlyFans-7.6\modules\fansly.py", line 799, in prepare_scraper unrefined_set = await subscription.get_messages() File "\WORKING_DIRECTORY\OnlyFans-7.6\apis\fansly\classes\create_user.py", line 357, in get_messages groups = await self.get_groups() File "\WORKING_DIRECTORY\OnlyFans-7.6\apis\fansly\classes\create_user.py", line 338, in get_groups response = response["response"] TypeError: 'error_details' object is not subscriptable

Remedy

Modify prepare_scraper() within \modules\fansly.py After Line 799: if api_type == "Messages": I added return True so that I omit this type of content.

DIGITALCRIMINAL commented 2 years ago

Try latest commit