-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_scraper.py
39 lines (34 loc) · 1.36 KB
/
run_scraper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import food_chat_app.models.scraper.webscraper as webscraper
import time
import pandas as pd
if __name__ == '__main__':
# print('getting...')
# webscraper.run('data/restaurant_data0.csv', 0, 100)
# print('getting...')
# webscraper.run('data/restaurant_data1.csv', 100, 200)
# time.sleep(10)
# print('getting...')
# webscraper.run('data/restaurant_data2.csv', 200, 300)
# time.sleep(10)
# print('getting...')
# webscraper.run('data/restaurant_data3.csv', 300, 400)
# time.sleep(10)
# print('getting...')
# webscraper.run('data/restaurant_data4.csv', 400, 500)
# time.sleep(10)
# print('getting...')
# webscraper.run('data/restaurant_data5.csv', 500, 600)
# time.sleep(10)
# print('getting...')
# webscraper.run('data/restaurant_data6.csv', 600, 700)
# time.sleep(10)
# df0=pd.read_csv("data/restaurant_data0.csv")
# df1=pd.read_csv("data/restaurant_data1.csv")
# df2=pd.read_csv("data/restaurant_data2.csv")
# df3=pd.read_csv("data/restaurant_data3.csv")
# df4=pd.read_csv("data/restaurant_data4.csv")
# df5=pd.read_csv("data/restaurant_data5.csv")
# full_df = pd.concat([df0,df1,df2,df3,df4,df5])
# final_df = full_df.drop_duplicates(keep='last')
# final_df.to_csv('data/restaurant_data_temp.csv', index=False)
# webscraper.run('data/restaurant_data5.csv', 200, 300)