urllib.urlretrieve file python 3.3

前端 未结 1 1372
耶瑟儿~
耶瑟儿~ 2021-01-03 23:50

I know I have seen the answer somewhere a couple of weeks ago but I can\'t find it now.

Simple urllib.urlretrieve in Python 3.3. How do you do it? I\'

相关标签:
1条回答
  • 2021-01-04 00:41

    In Python 3.x, the urlretrieve function is located in the urllib.request module:

    >>> from urllib import urlretrieve
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: cannot import name urlretrieve
    >>>
    >>> from urllib.request import urlretrieve
    >>> urlretrieve
    <function urlretrieve at 0x023C2390>
    >>>
    
    0 讨论(0)
提交回复
热议问题