Skip to content

Commit

Permalink
don't use manager to share values with subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Feb 26, 2024
1 parent a199179 commit 39f147a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ofscraper/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions ofscraper/download/downloadbatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions ofscraper/download/keyhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 39f147a

Please sign in to comment.