-
Notifications
You must be signed in to change notification settings - Fork 8
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
weather #55
Comments
@keepcalm444 could you please share with us how you grab BoM data? |
Just for reference, this is how another bot behaves when you ask it for weather:
|
here's a gist (it's a php script, found in action here) stationList is only for NSW though. If it's needed I can generate a few for other states. |
Here's a Whirlpool thread about the BoM API. |
Here's a Gist for generating the list of stations (and the actual lists themselves in INI format (yay)) for all the states, because the BoM has some screwed up stuff going on. |
Does it come with a JSON api? Or do we have to do some type of html scraping? @keepcalm444, can you comment? From what @auscompgeek posted, it looks like you're doing scraping using regex. I point you all to: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags. |
A fair chunk of the scraping is done via Regex for speed reasons (at least legacy speed reasons, I'm a bit out of touch with the codebase right now). |
Fair 'nuff. I would like to see some legitimate speed tests (probably with some form of memory profiling too) to see whether or not this is still true with the current codebase (and with py3k). Also, we should do some |
Yeah I really have no idea. Maybe after exams :3 |
@cyphar The BoM has a JSON API (sorta) for weather data, however, you need the IDs of each weather station to do this. I'm not sure whether there's an API to grab weather station IDs. Yes, I used regex to scrape HTML to generate the ID list. See the 2nd top-voted answer to the Stack Overflow thread you linked to. And yeah, what ackwell said. |
Suggestions:
Note: The Weather Channel refers to Weather Underground for an API.
Yahoo! also has RSS feeds.Note: Yahoo! uses data from The Weather Channel, so we can forget that.
Here's a whole list of weather APIs (filtered to JSON format).
The text was updated successfully, but these errors were encountered: