Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97762

performance.getEntries() not getting updates

$
0
0

I'm trying to get a json of all the past network entries from a streaming website. Here's a screenshot of where I see those network entries:

enter image description here

Once you press the play button, the website loads .acc files (like .mp3) over a period of time, approximately every 11 seconds. I'm running a script to get all the entries (it's a list of dicts) specified by script =. This script eventually stops updating at 250 entries, even though there continue to be .acc files loaded into the page. This expresses itself as print(current==last) eventually printing True. I don't know why the getEntries is not recognizing the items loaded past 250. Help me out?

Code:

script = "var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {}; var network = performance.getEntries() || {}; return network;"
url = 'https://www.iheart.com/live/kiss-108-1097/'

options = Options()
driver = webdriver.Firefox(options=options)
driver.get(url)

last= 0
for i in range(100):
     time.sleep(11)
     current = driver.execute_script(script)
     print(current==last)
     last=current

Viewing all articles
Browse latest Browse all 97762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>