-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check / update data for indoor swimming pools #1
Comments
Hi! I cannot fully understand why executing the script "src/scrapers/leipzig-swimming-pools.js" leads to writing an empty JSON file ("public/data/leipzig-swimming-pools.json"). If I understood correctly, the script "leipzig-swimming-pools.js" uses the module "scrape-it" to retrieve the data on swimming pools from two URLs, and these data would be retrieved via AJAX requests. However, I checked for AJAX requests using the Developer Tools of Chrome (Network tab -> Fetch/XHR) and the data retrieved via AJAX requests has nothing to do with swimming pool data (it's the Werbung of the "Stadtliche Karriere" that shows at the bottom on the right). Also, I checked the URLs HTML source code and the lists of Schwimmhallen/Freibäder are hard coded anyway, though the information shown on the webpages is not structured/as detailed as in the file "public/data/leipzig-swimming-pools.json" of this repository. My guess is that the webpages corresponding to the two URLs were changed or the existing data ("public/data/leipzig-swimming-pools.json") was obtained in another way (OpenStreetMap?). |
leipzig-swimming-pools.js uses the npm library https://www.npmjs.com/package/scrape-it to scrape the swimming pools data from https://www.leipzig.de/freizeit-kultur-und-tourismus/sport/sportstaetten/freibaeder by select each entry on that site and also follow for each the hyperlink to the details page to scrape the details data as well. Obviously they redesigned the web page, so the matchers don't work anymore and thus produce an empty JSON file. |
I've fixed the scraper: https://github.com/CodeforLeipzig/leipzigmaps/blob/main/src/scrapers/leipzig-swimming-pools.js
|
Official data
https://www.leipzig.de/freizeit-kultur-und-tourismus/sport/sportstaetten/schwimmhallen
JSON data
scraped via
yarn run scrape-swimming-pools
Scraped output
public/data/leipzig-swimming-pools.json
Transformed output
no additional transformation needed
Referenced in code
src/components/Map.js
showMarker -> swimming_pools
App
The text was updated successfully, but these errors were encountered: