YoutubeDL.py 文件源码

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

项目:kodi-plugin.video.ted-talks-chinese 作者: daineseh 项目源码 文件源码
def download_with_info_file(self, info_filename):
        with contextlib.closing(fileinput.FileInput(
                [info_filename], mode='r',
                openhook=fileinput.hook_encoded('utf-8'))) as f:
            # FileInput doesn't have a read method, we can't call json.load
            info = self.filter_requested_info(json.loads('\n'.join(f)))
        try:
            self.process_ie_result(info, download=True)
        except DownloadError:
            webpage_url = info.get('webpage_url')
            if webpage_url is not None:
                self.report_warning('The info failed to download, trying with "%s"' % webpage_url)
                return self.download([webpage_url])
            else:
                raise
        return self._download_retcode
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号