ArchivedUltimaScraper icon indicating copy to clipboard operation
ArchivedUltimaScraper copied to clipboard

Endless loop, and I can't download anything

Open djmarioka opened this issue 1 year ago • 5 comments

Hi,

as this screenshot shows, it goes for an endless loop, and I can't download anything:

image

Could anybody help me to fix this issue?.

Thanks.

djmarioka avatar Aug 03 '23 00:08 djmarioka

Hi,

as this screenshot shows, it goes for an endless loop, and I can't download anything: image

Could anybody help me to fix this issue?.

Thanks.

try this fix https://github.com/DIGITALCRIMINALS/UltimaScraper/issues/1052#issuecomment-1656749834

IntoTheBlackHole avatar Aug 03 '23 08:08 IntoTheBlackHole

This is a separate issue from the one linked, it seems to be going through all of their subscriptions even though they choose one. I may be wrong but I think it's grabbing all the messages/paid content so if you go into your config.json and on line 71 set "messages" to false and on line 72 set "paid_contents" to false it should stop doing that.

Edit: wanted to also mention that this doesn't disable the downloading of messages/paid content of the profile you choose.

dvfaa avatar Aug 04 '23 00:08 dvfaa

You're not stuck in an endless loop. It just feels that way. As dvfaa mentioned changing $.supported.onlyfans.settings.jobs.scrape.messages and $.supported.onlyfans.settings.jobs.scrape.paid_contents to false stops the app from adding every model that ever messaged you or had content you paid for to the list you selected.

It's bad defaults and poorly worded settings. With the prompting, you'd expect for it to follow what you asked for instead of a file most users won't touch.

stranger-danger-zamu avatar Sep 07 '23 05:09 stranger-danger-zamu

Here is a diff of the changes I made to ultima_scraper_collection library to make it work as expected (ie. only collect from users that the end-user selected).

Not sure if I'm happy with the redundancy of two sets: user_selected and valid_user_list. They probably could be put into a dict[str,user_type], but I left them as is just in case Fansly does something weird.

diff --git a/ultima_scraper_collection/modules/module_streamliner.py b/ultima_scraper_collection/modules/module_streamliner.py
index cd11213..dcbc629 100644
--- a/ultima_scraper_collection/modules/module_streamliner.py
+++ b/ultima_scraper_collection/modules/module_streamliner.py
@@ -85,6 +85,9 @@ class StreamlinedDatascraper:
             option_manager.subscription_options.final_choices
         )
         scraping_subscriptions = site_config.jobs.scrape.subscriptions
+
+        user_selected = set(user.username for user in valid_user_list)
+
         identifiers = []
         if performer_options:
             identifiers = performer_options.return_auto_choice()
@@ -139,7 +142,8 @@ class StreamlinedDatascraper:
         final_valid_user_set = {
             user
             for user in valid_user_list
-            if user.username not in user.get_authed().blacklist
+            if  user.username not in user.get_authed().blacklist
+            and user.username in user_selected
         }
 
         self.user_list = final_valid_user_set

There is also a minor change for UltimaScraper itself to at least make this behavior seem less like an infinite loop. Essentially, just printing out the username before asking which contents to scrape for that user.

diff --git a/ultima_scraper/ultima_scraper.py b/ultima_scraper/ultima_scraper.py
index d3c847d..9c750d8 100644
--- a/ultima_scraper/ultima_scraper.py
+++ b/ultima_scraper/ultima_scraper.py
@@ -201,7 +202,7 @@ class UltimaScraper:
                 if not user.scrape_whitelist
                 else user.scrape_whitelist
             )
-
+            print(user.username)
             content_options = await self.option_manager.create_option(
                 content_types_keys, "contents", auto_api_choice
             )

stranger-danger-zamu avatar Sep 07 '23 06:09 stranger-danger-zamu

Hi,

as this screenshot shows, it goes for an endless loop, and I can't download anything:

image Could anybody help me to fix this issue?.

Thanks.

Same issue, and same solution as dvfaa shared above.

fightcancer2 avatar Sep 25 '23 13:09 fightcancer2