forked from Albahtross/Storefront
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (30 loc) · 950 Bytes
/
main.py
File metadata and controls
41 lines (30 loc) · 950 Bytes
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
39
40
41
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 17 16:23:21 2020
@author: alexl
"""
from makeURL import *
from locationParse import locationParse
from makePlaceDetailsAPICalls import makePlaceDetailsAPICalls
from cleanUp import *
from webScraper import *
##philly lat long is 39.952583, -75.165222
def main():
key = getKey();
lat = getLati();
long = getLongi();
rad = getRadius();
# 0 API calls
place_search_call = generatePlaceSearchCall(key, lat, long, rad)
# 1 API call
place_id_list = locationParse(place_search_call)
# 0 Calls
api_call_list = (makePlaceDetailsAPICalls(place_id_list))
# n Calls
URL_name_dict = applyRatingFilterAndBlacklist(api_call_list)
print(URL_name_dict)
# n Calls to read HTML
sites_with_sale = webScraper(URL_name_dict)
print(sites_with_sale)
if __name__== "__main__":
main()