In the first part I talked about how you can create a quick parsing of required data about the organizations using the program ZennoPoster. Now it is the turn to discuss the process of data processing and improve case that the data recorded in the table faster, and was more informative (more columns).
Optimization of the script
At the moment, the previous action was almost entirely recycled due to the fact that it is difficult to parse just 1 city + to record directly to the MYSQL database using ZennoPoster also takes some time. Now you can quickly put all cities of Russia… but one at a time, of course, the city for the 1st time. In the future, you can just merge table cells to speed up the process.
So, what was done:
For a start it would be easier to choose a city from the ready-made list, rather than to select its number from the text in a folder or manually enter in the input field(see screenshot above).
It was also more convenient to take multiple API keys in case one of them will be irrelevant or will the queries per day (an automatic process).
In addition, you can manually set the number of queries parsing Yandex Maps (handy if you have a limited amount of API requests).
The result of parsing
Data output is carried out in a popular format .CSV and delimited columns values are “;”. Unicode text (UTF-8).
The time spent on parsing is less than a minute with a script that makes it easier to manual data collection. This is especially true for Moscow and St. Petersburg, where the number of the organization can amount to several hundreds, and even thousands.
Action do all the manual work (well, almost all). The only thing you need to do next, is to remove unnecessary data, since Yandex is not always collect exactly what you meant in the request!