request.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:mobot 作者: JokerQyou 项目源码 文件源码
def download(self, url, filename, timeout=None):
        """Download a file by its URL.
        Args:
            url (str): The web location we want to retrieve.
            timeout (Optional[int|float]): If this value is specified, use it as the read timeout
                from the server (instead of the one specified during creation of the connection
                pool).

          filename:
            The filename within the path to download the file.

        """
        buf = self.retrieve(url, timeout=timeout)
        with open(filename, 'wb') as fobj:
            fobj.write(buf)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号