|
@ -20,7 +20,7 @@ def load_likes(driver, profile_url): |
|
|
|
|
|
|
|
|
driver.get("{0}/likes_all".format(profile_url)) |
|
|
driver.get("{0}/likes_all".format(profile_url)) |
|
|
|
|
|
|
|
|
wait = WebDriverWait(driver, 30) |
|
|
wait = WebDriverWait(driver, 20) |
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
wait.until( |
|
|
wait.until( |
|
@ -30,7 +30,6 @@ def load_likes(driver, profile_url): |
|
|
LOG.exception("Traceback of load_likes") |
|
|
LOG.exception("Traceback of load_likes") |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_page_links(driver): |
|
|
def get_page_links(driver): |
|
|
""" |
|
|
""" |
|
|
Gets all of the links to the pages you like |
|
|
Gets all of the links to the pages you like |
|
@ -46,7 +45,6 @@ def get_page_links(driver): |
|
|
|
|
|
|
|
|
return [page.get_attribute("href").replace("www", "mobile") for page in pages] |
|
|
return [page.get_attribute("href").replace("www", "mobile") for page in pages] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def unlike_page(driver, url, archive=None): |
|
|
def unlike_page(driver, url, archive=None): |
|
|
""" |
|
|
""" |
|
|
Unlikes a page given the URL to it |
|
|
Unlikes a page given the URL to it |
|
@ -64,7 +62,7 @@ def unlike_page(driver, url, archive=None): |
|
|
|
|
|
|
|
|
print("Unliking {0}".format(url)) |
|
|
print("Unliking {0}".format(url)) |
|
|
|
|
|
|
|
|
wait = WebDriverWait(driver, 60) |
|
|
wait = WebDriverWait(driver, 20) |
|
|
|
|
|
|
|
|
actions = ActionChains(driver) |
|
|
actions = ActionChains(driver) |
|
|
|
|
|
|
|
|