Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
DIGITALCRIMINAL committed Jun 15, 2023
1 parent c5f7904 commit 301216d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions tests/test_signed_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ async def example(
):
async def authenticate():
onlyfans_api = OnlyFansAPI(Config())
auth = onlyfans_api.add_auth()
authed = await auth.login(guest=True)
authed = await onlyfans_api.login(guest=True)
return authed

authed = await authenticate()
Expand Down
14 changes: 7 additions & 7 deletions ultima_scraper/ultima_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def start_datascraper(
self.option_manager.performer_options = subscription_options
for auth in api.auths:
auth: auth_types = auth
if not auth.auth_details:
if not auth.get_auth_details():
continue
setup = False
setup, _subscriptions = await datascraper.account_setup(
Expand All @@ -94,10 +94,10 @@ async def start_datascraper(
api, "auth_webhook", "failed", global_settings
)
auth_details: dict[str, Any] = {}
auth_details["auth"] = auth.auth_details.export()
auth_details["auth"] = auth.get_auth_details().export()
profiles_directory = datascraper.filesystem_manager.profiles_directory
user_auth_filepath = profiles_directory.joinpath(
api.site_name, auth.auth_details.username, "auth.json"
_user_auth_filepath = profiles_directory.joinpath(
api.site_name, auth.get_auth_details().username, "auth.json"
)
# main_helper.export_json(auth_details, user_auth_filepath)
continue
Expand Down Expand Up @@ -168,9 +168,9 @@ async def process_profiles(
if not json_auth.get("active", None):
continue
json_auth["username"] = user_profile.name
auth = api.add_auth(json_auth)
auth.session_manager.proxies = global_settings.proxies
datas = {"auth": auth.auth_details.export()}
authed = await api.login(json_auth)
authed.session_manager.add_proxies(global_settings.proxies)
datas = {"auth": authed.get_auth_details().export()}
if datas:
main_helper.export_json(datas, user_auth_filepath)
return api
Expand Down

0 comments on commit 301216d

Please sign in to comment.