summaryrefslogtreecommitdiff
path: root/examples/graph
diff options
context:
space:
mode:
authorXiangyu Xu <bkbncn@gmail.com>2021-05-14 15:48:47 -0500
committerGitHub <noreply@github.com>2021-05-14 22:48:47 +0200
commit604a5e115fc4a14f41059e012d49eed23ce95518 (patch)
tree6dee3837ca7da77ea5e893d124bc3e899c0e37aa /examples/graph
parent5974a85f9054f00a32f4f9067ac618c71f126a83 (diff)
downloadnetworkx-604a5e115fc4a14f41059e012d49eed23ce95518.tar.gz
fix urllib import (#4793)
* fix urllib import * update urllib import
Diffstat (limited to 'examples/graph')
-rw-r--r--examples/graph/plot_football.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/graph/plot_football.py b/examples/graph/plot_football.py
index cf8eb45b..e95216dc 100644
--- a/examples/graph/plot_football.py
+++ b/examples/graph/plot_football.py
@@ -12,7 +12,7 @@ Requires Internet connection to download the URL
http://www-personal.umich.edu/~mejn/netdata/football.zip
"""
-import urllib.request as urllib
+import urllib.request
import io
import zipfile
@@ -21,7 +21,7 @@ import networkx as nx
url = "http://www-personal.umich.edu/~mejn/netdata/football.zip"
-sock = urllib.urlopen(url) # open URL
+sock = urllib.request.urlopen(url) # open URL
s = io.BytesIO(sock.read()) # read into BytesIO "file"
sock.close()