柿子饼同学 发表于 2021-2-28 22:14:48

B站爬取视频问题

使用了这个程序爬取B站视频,结果后面报错了,是不是视频太大,应该怎么解决{:10_266:}
使用的程序链接:传送门
=================== RESTART: C:/Users/86177/Desktop/Billi.py ===================
请输入视频BV或AV号:BV1QW411N762
准备下载【Web前端开发】《零基础入门学习Web开发》(HTML5&CSS3).flv...
开始下载...
Traceback (most recent call last):
File "C:/Users/86177/Desktop/Billi.py", line 77, in <module>
    DBV.main()
File "C:/Users/86177/Desktop/Billi.py", line 72, in main
    self.download_video(aid, cid, info['title'] + ".flv")
File "C:/Users/86177/Desktop/Billi.py", line 60, in download_video
    video = self.open_url(url)
File "C:/Users/86177/Desktop/Billi.py", line 9, in open_url
    res.encoding = res.apparent_encoding
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\models.py", line 730, in apparent_encoding
    return chardet.detect(self.content)['encoding']
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\site-packages\chardet\__init__.py", line 41, in detect
    detector.feed(byte_str)
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\site-packages\chardet\universaldetector.py", line 211, in feed
    if prober.feed(byte_str) == ProbingState.FOUND_IT:
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\site-packages\chardet\charsetgroupprober.py", line 71, in feed
    state = prober.feed(byte_str)
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\site-packages\chardet\hebrewprober.py", line 227, in feed
    byte_str = self.filter_high_byte_only(byte_str)
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\site-packages\chardet\charsetprober.py", line 63, in filter_high_byte_only
    buf = re.sub(b'([\x00-\x7F])+', b' ', buf)
File "C:\Users\86177\AppData\Local\Programs\Python\Python39-32\lib\re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
MemoryError
>>>
谢谢{:10_257:}

kogawananari 发表于 2021-3-1 02:32:12

32位是这样的

柿子饼同学 发表于 2021-3-1 10:17:39

kogawananari 发表于 2021-3-1 02:32
32位是这样的

那64位就能用咯{:10_257:}
页: [1]
查看完整版本: B站爬取视频问题