Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed Nov 9, 2020
1 parent 3c26d4a commit 55a7b05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
18 changes: 9 additions & 9 deletions apis/api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ def json_request(link, session, method="GET", stream=False, json_format=True, da
return result


def multiprocessing():
max_threads = global_settings["max_threads"]
if max_threads < 1:
pool = ThreadPool()
else:
pool = ThreadPool(max_threads)
return pool


def create_session(settings={}, custom_proxy="", test_ip=True):
sessions = [requests.Session()]
settings = set_settings(settings)
Expand Down Expand Up @@ -147,15 +156,6 @@ def set_sessions(proxy):
return sessions


def multiprocessing():
max_threads = global_settings["max_threads"]
if max_threads < 1:
pool = ThreadPool()
else:
pool = ThreadPool(max_threads)
return pool


def copy_sessions(original_sessions):
sessions = []
for original_session in original_sessions:
Expand Down
3 changes: 1 addition & 2 deletions modules/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def scrape_choice(api, subscription):
user_id = subscription.id
post_count = subscription.postsCount
archived_count = subscription.archivedPostsCount
s = subscription
media_types = ["Images", "Videos", "Audios", "Texts"]
if auto_choice:
input_choice = auto_choice
Expand Down Expand Up @@ -268,7 +267,7 @@ def paid_content_scraper(api):
results = []
for paid_content in paid_contents:
author = paid_content.get("author")
author = paid_content.get("fromUser",author)
author = paid_content.get("fromUser", author)
subscription = create_subscription(author)
subscription.sessions = api.sessions
subscription.download_info["directory"] = j_directory
Expand Down

0 comments on commit 55a7b05

Please sign in to comment.