我正在尝试使用bs4从脚本标记获取链接
这是我想从中删除链接的标签
html = """<script type="text/javascript">var player = new Clappr.Player({
sources: ["https://example.com/zx5x4vxkb52dxcne4zwsbbn6rpafhxnsodnlcjifkdqatbvqbc5axyv4dpuq/v.mp4","https://example.com/zx5x4vxkb52dxcne4zwsbbn6rpafhxnsodnlcjifkyyarbvqbc5dtluomera/v.mp4"]
poster: "image.jpg",
width: "100%",
height: "100%",
disableVideoTagContextMenu: true,
parentId: "#vplayer",
events: {
onReady: function() { },
}"""
如何获取“源”中的链接
link1 = "https://example.com/zx5x4vxkb52dxcne4zwsbbn6rpafhxnsodnlcjifkdqatbvqbc5axyv4dpuq/v.mp4"
link2 = "https://example.com/zx5x4vxkb52dxcne4zwsbbn6rpafhxnsodnlcjifkyyarbvqbc5dtluomera/v.mp4"
链接匹配,所以我只需要其中一个
注: doamin名称每次都会更改 所以我无法搜索example.com
输出:
或
输出:
相关问题 更多 >
编程相关推荐