From 39f147a2bfdf3396f0e91db872a09ea5c7ee1915 Mon Sep 17 00:00:00 2001 From: datawhores Date: Sun, 25 Feb 2024 18:10:49 -0600 Subject: [PATCH] don't use manager to share values with subprocess --- ofscraper/commands/check.py | 2 +- ofscraper/download/downloadbatch.py | 6 +++--- ofscraper/download/keyhelpers.py | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ofscraper/commands/check.py b/ofscraper/commands/check.py index dfa32bed0..7bc7a1a14 100644 --- a/ofscraper/commands/check.py +++ b/ofscraper/commands/check.py @@ -299,7 +299,7 @@ def message_checker(): def purchase_checker(): user_dict = {} - auth_requests.make_headers(auth_file.read_auth()) + auth_requests.make_headers() ROWS = [] for user_name in read_args.retriveArgs().username: user_name = profile.scrape_profile(user_name)["username"] diff --git a/ofscraper/download/downloadbatch.py b/ofscraper/download/downloadbatch.py index dbe05794c..e43818a50 100644 --- a/ofscraper/download/downloadbatch.py +++ b/ofscraper/download/downloadbatch.py @@ -87,9 +87,9 @@ def process_dicts(username, model_id, filtered_medialist): logqueues_[i // split_val], otherqueues_[i // split_val], connect_tuples[i][1], - dates.getLogDateVManager(), - selector.get_ALL_SUBS_DICTVManger(), - read_args.retriveArgsVManager(), + dates.getLogDate(), + selector.get_ALL_SUBS_DICT(), + read_args.retriveArgs(), ), ) for i in range(num_proc) diff --git a/ofscraper/download/keyhelpers.py b/ofscraper/download/keyhelpers.py index 146ebaa17..7557fcd2a 100644 --- a/ofscraper/download/keyhelpers.py +++ b/ofscraper/download/keyhelpers.py @@ -41,9 +41,10 @@ async def un_encrypt(item, c, ele, input_=None): setLog(input_ or common.log) key = None keymode = settings.get_key_mode() - past_key = await asyncio.get_event_loop().run_in_executor( - common.cache_thread, partial(cache.get, ele.license) - ) + # past_key = await asyncio.get_event_loop().run_in_executor( + # common.cache_thread, partial(cache.get, ele.license) + # ) + past_key = None if past_key: key = past_key log.debug(f"{get_medialog(ele)} got key from cache") @@ -153,7 +154,7 @@ async def key_helper_cdrm2(c, pssh, licence_url, id): try: log.debug(f"ID:{id} pssh: {pssh!=None}") log.debug(f"ID:{id} licence: {licence_url}") - headers = auth_requests.make_headers(auth_file.read_auth()) + headers = auth_requests.make_headers() headers["cookie"] = auth_requests.get_cookies() auth_requests.create_sign(licence_url, headers) json_data = {