jpy
jpy

Reputation: 169

Selector driver.page_source does not return all html

I am writing a code in python with a selector from scrapy.

selector = Selector(text=driver.page_source) 

Is not returning the page's html.

Any idea why ?

Upvotes: 0

Views: 109

Answers (1)

JD2775
JD2775

Reputation: 3801

Try this:

from selenium import webdriver

driver = webdriver.Chrome("C:/path/to/chromedriver.exe")
driver.get("http://google.com")

selector = driver.page_source

print(selector)

Upvotes: 1

Related Questions