forked from omkarcloud/google-maps-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwmf_scraping.py
26 lines (21 loc) · 946 Bytes
/
wmf_scraping.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
from src import Gmaps
import os
path_root = os.getenv("ONEDRIVE_PATH")
if not os.path.isdir(path_root):
raise "you do not have the ONEDRIVE_PATH environment variable set up. Please set it up first."
# iterate accross all german cities
queries = Gmaps.Cities.Germany("'WMF'")
# iterate accross all countries where there are WMF stores
queries.extend(["'WMF' Switzerland",
"'WMF' Netherlands",
"'WMF' Austria",
"'WMF' France",
"'WMF' Portugal",])
# scrape additional stores that were missed in the previous scraping
queries.extend(['WMF Filiale Klagenfurt',
'WMF Filiale Dornbirn',
'Kaiser Werksverkauf',
'Silit Werksverkauf'])
Gmaps.places(queries, scrape_reviews=True, reviews_max=Gmaps.ALL_REVIEWS,
convert_to_english=False, path=os.path.join(path_root, 'gmaps_scraping'),
lang=Gmaps.Lang.English)