VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hello,

    I need a curl command to extract m3u8 URL from below website:

    https://rotana.net/en/channels?tz=-180/channels#/live/rotana_Clip

    The resulting URL will be something like this:

    https://rotananet.hibridcdn.net/rotana/clip_abr/rotana/clip_720p/chunks.m3u8?p=48&s=17...6ebf28a104f83f

    Please note that the parameters "e", "s", "cf" and "h" will change on each page reload.

    Thanks in advance.
    Quote Quote  
  2. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Curl bash
    Code:
    id="rotana_Clip"; curl -s "https://rotana.net/en/channels?tz=-180/channels#/live/$id" | grep -oE "<[^>]* id=\"$id\"[^>]*https?://[^'\'']*" | grep -oE 'https?://[^'\''"]+' | xargs -I {} curl -s "{}?_=$(date +%s)" | grep -oP "(?<=o=\[)[^\]]+(?=])" | tr -d "'," | base64 -d | grep -o '"streamUrl":\s*"[^"]*"' | awk -F '"' '{print $4}'
    Output:
    Code:
    https://hiplayer.hibridcdn.net/p/rotana-clip?p=48&s=1708628259&e=1708714659&cf=1708714659&h=160e4e940d53bcff6abff6d484fcf7b4
    Edit: And here's the command if you want the best resolution m3u8:
    Code:
    id="rotana_Clip"; curl -s "https://rotana.net/en/channels?tz=-180/channels#/live/$id" | grep -oE "<[^>]* id=\"$id\"[^>]*https?://[^'\'']*" | grep -oE 'https?://[^'\''"]+' | xargs -I {} curl -s "{}?_=$(date +%s)" | grep -oP "(?<=o=\[)[^\]]+(?=])" | tr -d "'," | base64 -d | grep -o '"streamUrl":\s*"[^"]*"' | awk -F '"' '{print $4}' | xargs -I {} curl -s {} | grep -oE 'https?://[^ ]*' | tail -1
    Output:
    Code:
    https://rotananet.hibridcdn.net/rotana/clip_abr/rotana/clip_1080p/chunks.m3u8?p=48&s=1708628259&e=1708714659&cf=1708714659&h=160e4e940d53bcff6abff6d484fcf7b4
    Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 22nd Feb 2024 at 13:09.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  3. Thank you very much for the above commands. They work perfectly!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!