python - How to scrape google? -


so wanna scrape google, have scraped craigslist using method can't seam scrape google reason (yes of course changed class , stuff..) want scrape:

i want scrape websites description:

image

from selenium import webdriver  path = r"c:\users\skid\desktop\chromedriver.exe"  driver = webdriver.chrome(path)  driver.get("https://www.google.com/#q=python+webscape+google")  posts = driver.find_elements_by_class_name("r") post in posts:     print(post.text) 

solved, add timer (import time, time.sleep(2)) before scraping.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -