码如下:
PID = 'lKGXIQa'
GetPlayer = "http://213432.com/liveforapp.php?cid={cid}&appid={appid}" .format(cid=PID,appid="01")
from urllib.request import urlopen
from pprint import pprint
from bs4 import BeautifulSoup
url = urlopen(GetPlayer)
print(url.read())
这样我就能得出
b'<a href="http://213432.com/live.php?token=dH0xNDc2XTU3NDc2JmM9bEtHWElRYSZhPTAxJnY9ZWJhZGY|">http://213432com/live.php?token=dH0xNDc2XTU3NDc2JmM9bEtHWElRYSZhPTAxJnY9ZWJhZGY|</a>'
问题是我只想得出 url ,因为待会要用...html 标签什么的没用,网上查了查好多没用的资料 TT ,有什么办法吗?
PID = 'lKGXIQa'
GetPlayer = "http://213432.com/liveforapp.php?cid={cid}&appid={appid}" .format(cid=PID,appid="01")
from urllib.request import urlopen
from pprint import pprint
from bs4 import BeautifulSoup
url = urlopen(GetPlayer)
print(url.read())
这样我就能得出
b'<a href="http://213432.com/live.php?token=dH0xNDc2XTU3NDc2JmM9bEtHWElRYSZhPTAxJnY9ZWJhZGY|">http://213432com/live.php?token=dH0xNDc2XTU3NDc2JmM9bEtHWElRYSZhPTAxJnY9ZWJhZGY|</a>'
问题是我只想得出 url ,因为待会要用...html 标签什么的没用,网上查了查好多没用的资料 TT ,有什么办法吗?