You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As there are multiple resources in the list I'm not quite sure how to pick the right one (in case the best download source isn't DWDS). Some examples would have to be checked out.
The text was updated successfully, but these errors were encountered:
Re-thinking above comment - this tool is just a wrapper to automate dwds. We don't care too much about other resources - if there are better ones, use/download them directly with some other tool.
So, - looking at the API more closely:
>>>import requests
>>>r = requests.get('https://catalogue.data.gov.bc.ca/api/3/action/package_show?id=bc-airports')
>>>dwds_url = [res['url'] for res in r.json()['result']['resources'] if 'dwds' in res['url']]
[u'https://apps.gov.bc.ca/pub/dwds/addProductsFromExternalApplication.do?productTypeId=0&productId=17006']
This gives just one result for this dataset - and should be 1 or 0 for most or all (3043) datasets.
Use the catalog API to find the DWDS path rather than scraping the catalog page. Path to download should be an item in the 'Resources' list. For example: https://catalogue.data.gov.bc.ca/api/3/action/package_show?id=conservation-lands
As there are multiple resources in the list I'm not quite sure how to pick the right one (in case the best download source isn't DWDS). Some examples would have to be checked out.
The text was updated successfully, but these errors were encountered: