M
M
miron2582018-09-06 14:44:47
PHP
miron258, 2018-09-06 14:44:47

How to parse all points from google maps on padi.com?

Good afternoon, you need to make a parser from padi.com.
I need a dive shop database. Ideally in EXEL. The columns are:
Name of the dive shop
URL
Email
Phone
Name of the person (if any)
Primarily USA, Canada, Germany, Switzerland, Austria, England. Then we'll talk about other countries.
USA and Canada very first
Sources:
padi.com in the menu - find a diveshop, a map pops up with marked dive shops
__________________________
How can I get json at once with all the shops from this site, namely the points from the GOOGLE map, at the moment the loading is done through AJAX dynamically and the points are loaded as the map is scrolled (the answer is given in JSON but only for points that are included in the map visibility area). Tell me how to parse all points at once from this map. Here is the specific link https://apps.padi.com/scuba-diving/dive-shop-locat... Thanks in advance. Really looking forward to the answer. At least let me know if this is feasible or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Novikov, 2018-09-06
@miron258

I do not see any special obstacles:
There is a URL
Accepts json parameters

cLat:33.638802
cLong:-117.603366
courseIds:""
distanceMeters:1000000
eLng:-117.1913786953125
levelIds:"3,2"
mapSize:"smaller"
nLat:33.99591887201719
offeringIds:""
sLat:33.280197932608054
searchString:""
specialtyId:-1
storeNumber:-1
wLng:-118.0153533046875

It is necessary to carry out an engineering review (read, test with different parameters) on what the Lang / Lng / Lat parameters affect, and simply write a query cycle that would request results from the server for all sections of the map.
The answer will help in the tests - the boundaries are indicated there. (SearchRecords array - search results, Bounds - search area boundaries)
In essence, the task is
1) to understand which query input parameters return which section of the map in Bounds)
2) select an array of input parameters to iterate over all sections of the map sequentially
3) run a loop and parse answers from SearchRecords into one storage
4) remove duplicates
5) convert to the desired format (csv for excel)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question