Python click player to get src URL

Hi all.

I’m trying to get a src for a video so it can play fullscreen through a channel.
But the player requires the visitor to click the play button before a appears with a authenticated src=""

Any way of mimicking the click so after the src can be opened?

Thanks!

@ideaprison said:
…the player requires the visitor to click the play button before a

No.

There are things such as Selenium but require opening a real web browser and automating the clicks. This is not feasible within a Plex channel.

Instead, try monitoring the sites traffic to see what calls are being made to construct the final video URL. If you cannot see where the video URL comes from within the site traffic, then you’ll have to trace the JavaScript function back to its source and figure out how the URL is being constructed.

A few tricks:

  1. Sometimes video host have easier to find streams from their mobile sites. Try setting the headers to a mobile platform to access it’s mobile site.
  2. Some video host offer an embed page, which can have easier to find video links
  3. Google Chrome Developer Tools are a way to monitor site traffic and view resources (as-well-as many other useful tools). They are included by default.

If you’re willing to share the site (and a video link if need be), then I can take a look for you.

Good tips. The site in questions is a local news site.

http://khon2.com/live-stream/

They use livestream.com embedded.
Their player is only visible when viewed (here at least) in Safari (maybe Chrome too), you get the HTML5 player. Instead of their flash player.

‘a.play_btn.js-play_button’ could be clicked through JS but I assume the plex channel can’t do that for me.

@ideaprison said:
Hawaii Breaking News, Live Video - Live News

They use livestream.com embedded.

After digging around livestream I did find the streaming URLs. Didn’t take time to figure out how to generate the correct keys to add with the URLs to make them play, because they will play with the Livestreamer.bundle created by @“coryo123”.

The channel was hanging up on unsupported resolutions, so I did a quick edit and added your Khon2 URL.
My Fork: GitHub - Twoure/Livestreamer.bundle at khon2

Hope this is sufficient.

Edit: switched branches

I installed your branch version. I get the quality options showing, but when I try to play a video it says “Couldn’t create the playback session for this item”

@ideaprison said:
I installed your branch version. I get the quality options showing, but when I try to play a video it says “Couldn’t create the playback session for this item”

Depending on how it was installed, the Service Code may not of registered. Try restarting PMS.

That was it Twoure. Thanks a lot for this!