I'm pretty new to this web scraping (Data extraction) stuff. I want to extract the user's reputation from his stackoverflow account. I'm using Selenium. I've successfully logged in but I can't get the data from the next url, which is http://stackoverflow.com
This is my code:
from selenium import webdriver
from selenium.webdriver.support import ui
def page_is_loaded(driver):
return driver.find_element_by_tag_name("body") != None
chromedriver = 'C:\\chromedriver.exe'
browser = webdriver.Chrome(chromedriver)
browser.get('https://stackoverflow.com/users/login')
username = browser.find_element_by_id("email")
password = browser.find_element_by_id("password")
username.send_keys("emailID")
password.send_keys("password")
browser.find_element_by_name("submit-button").click()
wait = ui.WebDriverWait(browser, 10)
wait.until(page_is_loaded)
print browser.current_url
It works, I get redirected to the next page, but the last command still prints: https://stackoverflow.com/users/login
Thanks in advance. I'm sure I'm missing something little.