enes3626
enes3626

Reputation: 47

Selenium Google Translate Website doesn't detect elements

I'm trying to use Google translate as a proxy for the website I'm scraping. But I can't detect elements from the website. This is the link. I pass the website through Google Translate and it acts as a proxy. But when I use driver.find_element_by_xpath("//*")it only detects Google Translate's elements. How can I detect elements from the actual website? Or is there any alternatives for that? This website only accepts Turkish IP addresses but I can't find enough free ones.

Upvotes: 0

Views: 179

Answers (1)

CodePuppet
CodePuppet

Reputation: 126

Try switching to Iframe before trying to get contents of your website.

driver.switch_to.frame(driver.find_element_by_xpath("//div[@id,'contentframe']/iframe"));

Upvotes: 2

Related Questions