urllib.request encode()/decode()

  1. urllib.request
  2. urlopen (url) # open directly corresponding url
  3. urlretrieve (url, image_path) # open directly to the url pictures stored behind a picture memory address
  4. encode () / decode () inside the parentheses is not written argument, the default is utf8, write only write gbk.

Guess you like

Origin www.cnblogs.com/ybl20000418/p/11564839.html