| 
 | 
 
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册  
 
x
 
小弟最近一直在研究 如何爬取 http://jisudhw.com/ 这个网站的电影  
还是废话不多说 直接上代码 
首先我定义了两个方法 
def download(url): 
    header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1', 
              'Referer':'http://www.jisudhw.com', 
              'Origin':'http://www.jisudhw.com', 
              'Host':'www.jisudhw.com' 
        }   
    r = req.get(url,headers = header) 
    r.encoding = 'utf-8' 
    html = BeautifulSoup(r.text,'lxml') 
 
    for each in  html.find_all('input'): 
        if 'm3u8' in each.get('value'): 
            durl = each.get('value') 
     
    return durl 
 
def ffmpeg_path(inputs_path, outputs_path): 
    a = FFmpeg( 
                inputs={inputs_path: None}, 
                outputs={outputs_path: '-c copy', 
                          } 
    ) 
    print(a.cmd) 
    a.run() 
然后调用  但是调用之后 就不行了 显示 
 
  File "*:\python\*.py", line 11, in <module> 
    ffmpy3.FFmpeg(inputs = {url:None},outputs = {name:None}).run() 
 
  File "*:\*\ffmpy3.py", line 130, in run 
    raise FFRuntimeError(self.cmd, self.process.returncode, out[0], out[1]) 
 
  File "*:\*\ffmpy3.py", line 273, in __init__ 
    stdout.decode(), 
 
AttributeError: 'NoneType' object has no attribute 'decode' 
完全懵逼 不知道怎么回事 再网上找了半天 也没有解决办法 请各位大神帮忙 |   
 
 
 
 |