Skip to content

Commit

Permalink
Stop mentioning "urllib2" in comments
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Opdenacker <[email protected]>
  • Loading branch information
Michael Opdenacker committed Feb 13, 2023
1 parent bb25260 commit 6a1e7fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/pdf-link-checker
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def url_fix(url):
# handle data entered by the user.

# Another thing we want to do is rewrite Windows file URLs
# that urllib2 won't know how to handle otherwise.
# that urllib won't know how to handle otherwise.

scheme, netloc, path, qs, anchor = urllib.parse.urlsplit(url)

Expand Down Expand Up @@ -108,7 +108,7 @@ def check_http_url(url, timeout):

# Add a browser-like User-Agent.
# Some sites (like wikipedia) don't seem to accept requests
# with the default urllib2 User-Agent
# with the default urllib User-Agent
request.add_header('User-Agent',
'Mozilla/5.0 (X11; U; Linux i686; en-US;'
'rv 1.7.8) Gecko/20050511')
Expand All @@ -129,7 +129,7 @@ def check_http_url(url, timeout):


def check_ftp_url(url):
# urllib2 doesn't raise any exception when a
# urllib doesn't raise any exception when a
# ftp url for an invalid file is given
# Only invalid domains are reported
# That's why we are using urllib.urlretrieve
Expand Down

0 comments on commit 6a1e7fc

Please sign in to comment.