Issue with login

master
Lasse Server 4 years ago
parent b135eb9b82
commit c3941f634c
  1. 2
      facebook/classes.py
  2. 13
      facebook/scrapers.py

@ -238,11 +238,13 @@ class Profile:
print("Loggade in.")
sleep_(2)
self.open(url_bas)
sleep_(2)
except TypeError:
try:
write_error(11, self, soup=soup, profile=self.name)
except:
print('KUNDE INTE LOGGA IN')
pass
def update_cookie(self, cookie):

@ -25,9 +25,20 @@ def profile_picture_reactions(profile, user, first_user=False, mode="all"):
# Gå till sidan för profilbilder
profile.open(user.url_photos)
# print(profile.viewing())
if 'Log in or sign up to view' in profile.viewing() or 'Log in to Facebook to start sharing' in profile.viewing():
print('INTE INLOGGAD')
profile.login()
profile.open(user.url_photos)
sleep_(4)
profile = check_profile_status(profile, user)
user.name = user.username # Om inte namnet hittas senare

Loading…
Cancel
Save