Summary: | BBC weather location search returns no matches | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Joe Dight <joe.dight> |
Component: | DataEngines | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, kdebugs, nate, zrenfire |
Priority: | NOR | ||
Version: | 5.20.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/commit/398762cf8763d56c5b6d6ce21ff29d30f3bb98d3 | Version Fixed In: | 5.22.1 |
Description
Joe Dight
2020-12-21 00:31:42 UTC
The website (https://www.bbc.com/weather) fetches: https://locator-service.api.bbci.co.uk/locations?api_key=AGbFAKx58hyjQScCXIYrxuEwJh2W2cmv&stack=aws&locale=en&filter=international&place-types=settlement,airport,district&order=importance&s=london&a=true&format=json The API Key (AGbFAKx58hyjQScCXIYrxuEwJh2W2cmv) can be found in the attribute of this element: <div class="wr-c-location-search-and-setting wr-c-location-search-and-setting--masthead" role="search" id="wr-location-search-params" data-forecast-page-url-template="/weather/{{location_id}}" data-edition="international" data-environment="live" data-locator-key="AGbFAKx58hyjQScCXIYrxuEwJh2W2cmv" data-uas-key="iofba4k90pgap" lang="en">...</div> However we should probably see if there's a way to register our own key. I looked into this, and there are a couple of options that don't need an API key. The easiest (utterly undocumented) seems to be this: https://open.live.bbc.co.uk/locator/locations?s=London&format=json The ids seem to be geonames, so you could also use their api described here: https://www.geonames.org/export/geonames-search.html How about adding the UK Met Office as an alternate source to the BBC? I created a wishlist request in bug 433377. I'm not sure if I put that bug in the correct category though. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/922 A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/925 Git commit 500e061366c66e2537f83278585717779addd63b by Joe Dight. Committed on 10/06/2021 at 17:45. Pushed by ngraham into branch 'master'. Point bbcukmet to new location API M +8 -7 dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp https://invent.kde.org/plasma/plasma-workspace/commit/500e061366c66e2537f83278585717779addd63b Git commit 398762cf8763d56c5b6d6ce21ff29d30f3bb98d3 by Nate Graham, on behalf of Joe Dight. Committed on 10/06/2021 at 17:49. Pushed by ngraham into branch 'Plasma/5.22'. Point bbcukmet to new location API (cherry picked from commit 500e061366c66e2537f83278585717779addd63b) M +8 -7 dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp https://invent.kde.org/plasma/plasma-workspace/commit/398762cf8763d56c5b6d6ce21ff29d30f3bb98d3 |