utorrent.py 文件源码

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

项目:pandachaika 作者: pandabuilder 项目源码 文件源码
def add_url(self, url: str, download_dir: str=None) -> bool:

        self.total_size = 0
        self.expected_torrent_name = ''

        params = {'action': 'add-url', 'token': self.token, 's': url}
        try:
            response = requests.get(
                self.UTORRENT_URL,
                auth=self.auth,
                # cookies=self.cookies,
                params=params,
                timeout=25).json()
            if 'error' in response:
                return False
            else:
                return True
        except RequestException:
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号