Skip to content

#94 use requests module instead of urllib.request to download preset #97

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smellman
Copy link
Contributor

Close #94

What I did(変更内容)

  • fixes download bug for preset "[JPN][北海道]北海道拓殖バス(一般路線バス・各町コミュニティバス)" by using requests module.

Notes(連絡事項)

Select "[JPN][北海道]北海道拓殖バス(一般路線バス・各町コミュニティバス)" and download it.

@bordoray bordoray self-requested a review May 28, 2025 23:43
@bordoray
Copy link
Contributor

bordoray commented May 28, 2025

@smellman Got a download error which appears in another way comparing to before.

エラー: Failed to download GTFS data from the URL: https://www.takubus.com/app/download/10941479479/GTFS_regular_line.zip?t=1606785205
image

Ran as it
image

Copy link
Contributor

@bordoray bordoray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't work as above comment

@smellman
Copy link
Contributor Author

smellman commented Jun 9, 2025

I run test in QGIS's Python console on Windows 11.

>>> import requests
>>> response = requests.get("https://www.takubus.com/app/download/10941479479/GTFS_regular_line.zip?t=1606785205")
>>> response.status_code
429

429 is Too Many Requests.
I think it is server reason, but, I can run above code without error in macOS and Windows 11 Powershell.
I will check requests modules with windows bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Occured Python error if GTFS data cannot be retrieved.
2 participants