base_config.py配置信息如下:
基础配置
PLATFORM = "bili"
KEYWORDS = "python,golang"
LOGIN_TYPE = "cookie" # qrcode or phone or cookie
COOKIES = "xxxxxx"
SORT_TYPE = "popularity_descending" # 具体值参见media_platform.xxx.field下的枚举值,展示只支持小红书
CRAWLER_TYPE = "download_video" # 爬取类型,search(关键词搜索) | detail(帖子相亲)| creator(创作者主页数据) | video_download (视频下载暂时只支持 bili)
指定B站平台需要爬取的视频bvid列表
BILI_SPECIFIED_ID_LIST = [
"av1204161056",
# "av865189147",
# "BV1Sz4y1U77N",
# "av1204161056",
# ........................
]
报错信息如下:
[BiliBili] Extracting URL: https://www.bilibili.com/video/av1204161056
[BiliBili] 1204161056: Downloading webpage
[BiliBili] BV18f421U7Wk: Extracting videos in anthology
[BiliBili] Downloading playlist BV18f421U7Wk - add --no-playlist to download just the video BV18f421U7Wk
[download] Downloading playlist: 【全368集】强推!建议所有想学Python的同学,死磕这条视频,2024年字节大佬花了一周时间整理的Python(数据分析)保姆级教程,全程干货无废话!
[BiliBili] Playlist 【全368集】强推!建议所有想学Python的同学,死磕这条视频,2024年字节大佬花了一周时间整理的Python(数据分析)保姆级教程,全程干货无废话!: Downloading 100 items of 100
[download] Downloading item 1 of 100
[BiliBili] Extracting URL: https://www.bilibili.com/video/BV18f421U7Wk?p=1
[BiliBili] 18f421U7Wk: Downloading webpage
[BiliBili] BV18f421U7Wk: Extracting videos in anthology
[BiliBili] 1204161056: Extracting chapters
[BiliBili] Format(s) 1080P 高清, 720P 高清 are missing; you have to login or become premium member to download them. Use --cookies-from-browser or --cookies for the authentication. See https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp for how to manually pass cookies
[info] BV18f421U7Wk_p1: Downloading 1 format(s): 100100+30280
ERROR: You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to --abort-on-error
Traceback (most recent call last):
File "D:\code\MediaCrawler-new\main.py", line 62, in
asyncio.get_event_loop().run_until_complete(main())
File "D:\anaconda\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\code\MediaCrawler-new\main.py", line 53, in main
await crawler.start()
File "D:\code\MediaCrawler-new\media_platform\bilibili\core.py", line 93, in start
await self.download_video_given_url(video_id, path=f'./video/{video_id}')
File "D:\code\MediaCrawler-new\media_platform\bilibili\core.py", line 140, in download_video_given_url
result = ydl.download([video_id])
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3572, in download
self.__download_wrapper(self.extract_info)(
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3547, in wrapper
res = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1595, in extract_info
return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1606, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1762, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1891, in process_ie_result
return self.__process_playlist(ie_result, download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 2035, in __process_playlist
entry_result = self.__process_iterable_entry(entry, download, collections.ChainMap({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1606, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 2067, in __process_iterable_entry
return self.process_ie_result(
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1841, in process_ie_result
return self.extract_info(
^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1595, in extract_info
return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1606, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1762, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1821, in process_ie_result
ie_result = self.process_video_result(ie_result, download=download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 2982, in process_video_result
self.process_info(new_info)
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3406, in process_info
self.report_error(f'{msg}. Aborting due to --abort-on-error')
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1073, in report_error
self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
File "D:\anaconda\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1012, in trouble
raise DownloadError(message, exc_info)
yt_dlp.utils.DownloadError: ERROR: You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to --abort-on-error
python-BaseException