Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed Nov 8, 2020
1 parent 995dc5c commit d2654b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
18 changes: 9 additions & 9 deletions apis/onlyfans/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def login(self, full=False, max_attempts=10):
{'name': 'auth_id', 'value': auth_id},
{'name': 'sess', 'value': auth_items.sess},
{'name': 'auth_hash', 'value': auth_items.auth_hash},
{'name': 'auth_uniq_'+auth_id, 'value': auth_items.auth_uniq_},
{'name': 'auth_uid_'+auth_id, 'value': None},
{'name': f'auth_uniq_{auth_id}', 'value': auth_items.auth_uniq_},
{'name': f'auth_uid_{auth_id}', 'value': None},
]
for session in self.sessions:
a = [session, link, auth_items.sess, user_agent]
Expand Down Expand Up @@ -552,7 +552,7 @@ def get_paid_content(self, check: bool = False, refresh: bool = True, limit: int
if not authed:
return
if not refresh:
result = self.handle_refresh(self, api_type)
result = self.handle_refresh(authed, api_type)
if result:
return result
link = links(global_limit=limit,
Expand All @@ -577,12 +577,12 @@ def __init__(self, option={}) -> None:
self.subscribedByData = subscribedByData(
option.get("subscribedByData", {}))
self.is_me = option.get("is_me", False)
self.postsCount = option.get("postsCount",0)
self.archivedPostsCount = option.get("archivedPostsCount",0)
self.photosCount = option.get("photosCount",0)
self.videosCount = option.get("videosCount",0)
self.audiosCount = option.get("audiosCount",0)
self.favoritesCount = option.get("favoritesCount",0)
self.postsCount = option.get("postsCount", 0)
self.archivedPostsCount = option.get("archivedPostsCount", 0)
self.photosCount = option.get("photosCount", 0)
self.videosCount = option.get("videosCount", 0)
self.audiosCount = option.get("audiosCount", 0)
self.favoritesCount = option.get("favoritesCount", 0)
self.avatar = option.get("avatar")
self.header = option.get("header")
self.hasStories = option.get("hasStories")
Expand Down
1 change: 1 addition & 0 deletions datascraper/main_datascraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def start_datascraper():
array = module.manage_subscriptions(api, auth_count)
subscription_array += array
if jobs["scrape_paid_content"]:
paid_contents = api.get_paid_content()
paid_content = module.paid_content_scraper(api)
apis.append(api)
subscription_list = module.format_options(
Expand Down
2 changes: 1 addition & 1 deletion modules/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def profile_scraper(api, directory, username):


def paid_content_scraper(api):
paid_contents = api.get_paid_content()
paid_contents = api.get_paid_content(refresh=False)
results = []
for paid_content in paid_contents:
author = paid_content.get("author")
Expand Down

0 comments on commit d2654b0

Please sign in to comment.