如何在Python中读取网络选项卡?
使用Selenium、Requests和Beauty Soup,我希望能够找到并打印此.m3u8链接(或此处显示的任何链接),但我不知道如何在Python中显示请求如何在Python中读取网络选项卡?,python,networking,web-scraping,firefox-developer-tools,Python,Networking,Web Scraping,Firefox Developer Tools,使用Selenium、Requests和Beauty Soup,我希望能够找到并打印此.m3u8链接(或此处显示的任何链接),但我不知道如何在Python中显示请求 必须使用ChromeDriver、Pycrome和DevTools协议,但这是有效的: def outputstart(**kwargs): print("START ", kwargs) driver = sp.driver # my chromedriver profile with an arg
必须使用ChromeDriver、Pycrome和DevTools协议,但这是有效的:
def outputstart(**kwargs):
print("START ", kwargs)
driver = sp.driver # my chromedriver profile with an argument added for port 8000
dev_tools = pychrome.Browser(url="http://localhost:8000")
tab = dev_tools.list_tab()[0]
tab.start()
url = 'https://google.com'
start = time.time()
driver.get(url)
tab.call_method("Network.emulateNetworkConditions",
offline=False,
latency=100,
downloadThroughput=93750,
uploadThroughput=31250,
connectionType="wifi")
def outputstart(**kwargs):
print("START ", kwargs)
tab.call_method("Network.enable", _timeout=20)
tab.set_listener("Network.requestWillBeSent", outputstart)
def outputstart(**kwargs):
print("START ", kwargs)
driver = sp.driver # my chromedriver profile with an argument added for port 8000
dev_tools = pychrome.Browser(url="http://localhost:8000")
tab = dev_tools.list_tab()[0]
tab.start()
url = 'https://google.com'
start = time.time()
driver.get(url)
tab.call_method("Network.emulateNetworkConditions",
offline=False,
latency=100,
downloadThroughput=93750,
uploadThroughput=31250,
connectionType="wifi")
def outputstart(**kwargs):
print("START ", kwargs)
tab.call_method("Network.enable", _timeout=20)
tab.set_listener("Network.requestWillBeSent", outputstart)