Skip to content

Commit

Permalink
language switch fix
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

converge committed Nov 30, 2018
1 parent 9c7f432 commit 2602102
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions instapy/login_util.py
Original file line number Diff line number Diff line change
@@ -172,17 +172,16 @@ def login_user(browser,
# include time.sleep(1) to prevent getting stuck on google.com
time.sleep(1)

web_address_navigator(browser, ig_homepage)
reload_webpage(browser)

# Changes instagram language to english, to ensure no errors ensue from
# having the site on a different language
# Might cause problems if the OS language is english
# changes instagram website language to english to use english xpaths
if switch_language:
language_element_ENG = browser.find_element_by_xpath(
"//select[@class='hztqj']/option[text()='English']")
click_element(browser, language_element_ENG)

web_address_navigator(browser, ig_homepage)
reload_webpage(browser)


# cookie has been LOADED, so the user SHOULD be logged in
# check if the user IS logged in
login_state = check_authorization(browser,

0 comments on commit 2602102

Please sign in to comment.