Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Make it such that to find the conversation group the creator is a par…
Browse files Browse the repository at this point in the history
…t of, it will look at all parties to the conversation, instead of just the first.
  • Loading branch information
UpAndDown666 committed Feb 12, 2023
1 parent f277242 commit d7da87d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions fansly_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def ask_correct_dir():
s(15)
exit() # this has to force exit

if base_directory == 'Local_directory': # if user didn't specify custom downloads path
if base_directory == 'Local_directory': # if user didn't specify custom downloads path
BASE_DIR_NAME = mycreator+'_fansly' # use local directory
elif os.path.isdir(base_directory): # if user specified a correct custom downloads path
BASE_DIR_NAME = os.path.join(base_directory, mycreator+'_fansly') # use their custom path & specify new folder for the current creator in it
Expand Down Expand Up @@ -331,12 +331,17 @@ def sort_download(filename,filebytes, directoryName):
else:
output(2,'\n [17]ERROR','<red>', 'Unknown filetype: "'+str(filename[-7:])+'" please report this on GitHub > Issues & provide a short explanation; continuing without that file ...')


# scrape messages
group_id = None
groups = sess.get('https://apiv3.fansly.com/api/v1/group', headers=headers).json()['response']['groups']
for x in range(len(groups)):
if groups[x]['users'][0]['userId'] == creator_id:
group_id = groups[x]['id']
users = groups[x]['users']
for y in range(len(users)):
if users[y]['userId'] == creator_id:
group_id = groups[x]['id']
break
if group_id:
break

if group_id:
Expand Down Expand Up @@ -414,7 +419,7 @@ def sort_download(filename,filebytes, directoryName):
preview_directory_name = directory_name
if cursor == 0:output(1,' Info','<light-blue>', f'Inspecting most recent page')
else:output(1,' Info','<light-blue>', f'Inspecting page: {cursor}')

# simple attempt to deal with rate limiting
while True:
try:
Expand Down

0 comments on commit d7da87d

Please sign in to comment.