Hi All,

just browsing through after answering the question posed: "is there a way..."

the short answer is no.

not picking on you Moritz just hi-jacking

There is no stream; no stream url; the broadcaster runs the player to order for each user; that creates a url which is not a url.

You could trigger the player and then use ffmpeg to record the ensuing stream but you will miss the start.

Finding the file and downloading it is the obvious solution.

Anything that works is OK. On the command line RegEx works. Who needs delicate?

I like; make a list; grind off any burrs; pick the one(s) you want; extract in some usable format; place somewhere convenient.

<div> <class> = clutter,chaff,confusion

I vote youtube-dl. It does what it says and it runs on Ubuntu. That said the other program yt-dlp may be better.

Bo should be downloading by now.

lunchtime!

Nice warm day

regards

Robert



On 26/12/21 2:53 am, Moritz Barsnick wrote:
On Sat, Dec 25, 2021 at 12:19:35 +0100, Reino Wijnsma wrote:
On 2021-12-25T10:13:14+0100, Bo Berglund <bo.bergl...@gmail.com> wrote:
But on the following pages it does not work at all:
https://www.svtplay.se/kanaler/svt1?start=auto
As I had mentioned in the thread previously, it's not given that the
stream URL is embedded in the actual web page. It might be listed in a
JSON file, which might even be referenced from the web page via
JavaScript or similar.

It's really bad practise to parse HTML with RegEx! It's as if you're using a 
sledgehammer when you should've been using a pair of tweezers for instance.
For fishing a single URL from a well-known syntactical construct, it
might be "good enough".

This div is where the magic happens. Take a good look at the
browser's network-traffic. You're probably going to need the value of
the "class"-attribute.
And this is what tools like youtube-dl (or its successor yt-dlp) and
svtplay-d do: They know well how to parse these pages, and can extract
the URL for you (check their "-g" options). You don't need to reinvent
the wheel. Unless you need to avoid python. ;)

https://github.com/yt-dlp/yt-dlp/
https://svtplay-dl.se/

(Jeg har faktisk VPN, og jeg har gjort akkurat dette før, med SVT og
lignende.)

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to