Actualiser resto_de_paris_scraping.py
This commit is contained in:
parent
f1af9ff406
commit
0b1a467388
|
@ -102,7 +102,6 @@ def get_menu(soup):
|
|||
|
||||
index_last_price = 0
|
||||
for i in range(len(prices_v2)):
|
||||
ic(prices_v2[i])
|
||||
if '€' in prices_v2[i]:
|
||||
index_last_price = i+1
|
||||
if index_last_price != 0:
|
||||
|
@ -124,13 +123,13 @@ def complete_scraping():
|
|||
|
||||
for name, url in zip(names, restaurants_url):
|
||||
temporary_df = pd.DataFrame(columns=['Name', 'Date', 'Address', 'Item', 'Price', ])
|
||||
ic()
|
||||
ic(name)
|
||||
page = requests.get(url)
|
||||
soup = BeautifulSoup(page.text, features='html.parser')
|
||||
temporary_df['Item'] = get_menu(soup).keys()
|
||||
temporary_df['Price'] = get_menu(soup).values()
|
||||
address = get_address(soup)
|
||||
ic(address)
|
||||
|
||||
for i in range(len(temporary_df)):
|
||||
temporary_df.loc[i, 'Name'] = name
|
||||
|
|
Loading…
Reference in New Issue
Block a user