https://www.bilibili.com/video/av31093146 - 在线代码运行


            
执行结果

名称:https://www.bilibili.com/video/av31093146

当前代码

#!/usr/bin/python
# -*- coding: UTF-8 -*-
import requests as req
import re
#获取B站封面
url = 'https://www.bilibili.com/video/av21061975'
rsp=req.get(url)
content=rsp.content.decode("utf-8","ignore")
par ="itemprop=\"image\" content=\"(.*?)\""
print re.findall(par,content)