Skip to content

Conversation

@LamentXU123
Copy link
Contributor

@LamentXU123 LamentXU123 commented Jul 4, 2025

in the tutorial doc of Internet access . We've got an example of urllib.

image

The example script:

from urllib.request import urlopen
with urlopen('http://worldtimeapi.org/api/timezone/etc/UTC.txt') as response:
    for line in response:
        line = line.decode()             # Convert bytes to a str
        if line.startswith('datetime'):
            print(line.rstrip())         # Remove trailing newline

So if you run this example it will always return 500. I've tested it in different network environments, and the original link doesn't work at all.

cc @ZeroIntensity similar to the former fix. I've overlooked this before, sry. Skiping news and issues as well.


📚 Documentation preview 📚: https://cpython-previews--136296.org.readthedocs.build/

@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Jul 4, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Jul 4, 2025
@LamentXU123 LamentXU123 changed the title Fix a broken link in urllib in stdlib tutorial Fix a unstable link in urllib in stdlib tutorial Jul 4, 2025
@LamentXU123
Copy link
Contributor Author

LamentXU123 commented Jul 4, 2025

No the link is not invalid, it's invalid in my region. Sorry for the noise >_<

@LamentXU123 LamentXU123 closed this Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant