Actualiser google_scraping.py
This commit is contained in:
parent
5740be9bbc
commit
70d581758b
|
@ -19,7 +19,7 @@ def google_scrap_fooding(df):
|
|||
|
||||
url = base_url + str(name).replace(' ', '-') + str(address).replace(' ', '-')
|
||||
ic()
|
||||
ic(url)
|
||||
ic(name)
|
||||
|
||||
driver.get(url)
|
||||
time.sleep(0.1)
|
||||
|
@ -69,14 +69,13 @@ def google_scrap_fute(df):
|
|||
ic()
|
||||
for name, address in zip(df['Name'], df['Address']):
|
||||
ic()
|
||||
ic(name)
|
||||
options = webdriver.ChromeOptions()
|
||||
options.add_argument("---headless=True")
|
||||
driver = webdriver.Chrome(options=options)
|
||||
base_url = 'https://www.google.com/search?hl=en&q='
|
||||
try:
|
||||
url = base_url + name.replace(' ', '-') + address.replace(' ', '-')
|
||||
ic(url)
|
||||
|
||||
driver.get(url)
|
||||
time.sleep(0.1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user