NameError: name 'urllib' is not defined "

前端 未结 5 918
傲寒
傲寒 2021-02-09 04:28

CODE:

import networkx as net
from urllib.request import urlopen
def read_lj_friends(g, name):
# fetch the friend-list from LiveJournal
response=urllib.urlopen(\'         


        
5条回答
  •  说谎
    说谎 (楼主)
    2021-02-09 05:11

    Try pls:

    from urllib.request import urlopen
    
    html = urlopen("http://www.google.com/")
    print(html.read) # Content 
    

提交回复
热议问题