Python 获取汤查找中的第一个链接

Python 获取汤查找中的第一个链接,python,beautifulsoup,Python,Beautifulsoup,我有个问题! 我试图找到一个视频源使用美丽的汤 link = 'http://oddshot.tv/shot/dreamhackcs-20151101122251803' r = requests.get(link) plain_text = r.text #print(r.text) soup = BeautifulSoup(plain_text, "html.parser") link_source = soup.find('source', src=True, href=False) pr

我有个问题! 我试图找到一个视频源使用美丽的汤

link = 'http://oddshot.tv/shot/dreamhackcs-20151101122251803'
r = requests.get(link)
plain_text = r.text
#print(r.text)
soup = BeautifulSoup(plain_text, "html.parser")
link_source = soup.find('source', src=True, href=False)
print(link_source)
但是,它返回以下内容:

<source src="https://d301dinc95ec5f.cloudfront.net/capture/dreamhackcs-20151101122251803.shot.mp4" type="video/mp4"><p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p></source>
<代码> < P类=“VJS No JS”>查看此视频请启用JavaScript,并考虑升级到

的Web浏览器 现在视频的源代码在那里,但我不知道如何将它转换为另一个变量,以便稍后在我的程序中使用

只要更换

print(link_source)

有关更多详细信息,请检查(标签.get()部分)。

只需更换即可

print(link_source)

有关更多详细信息,请检查(标签.get()部分)。

只需更换即可

print(link_source)

有关更多详细信息,请检查(标签.get()部分)。

只需更换即可

print(link_source)

有关更多详细信息,请查看(标签.get()部分)