VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Member
    Join Date
    Dec 2016
    Location
    Việt Nam
    Search Comp PM
    Hello,
    I have issues when downloading the m3u8 file.
    You can see in here

    Code:
    streamlink --http-cookie "User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36" "hls://https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/124821/Cau-01-24.smil/chunklist_w292079638_b1044100.m3u8?moontokenendtime=1641055028&moontokenhash=vqx4VIHqcKa7prcSutpVESpGXTX-VcEacxhJg2LHzxM%3D&moontokenstarttime=1641054968" best -o "02.mp4"
    Image
    [Attachment 62671 - Click to enlarge]

    I have tried with http-cookie but it still errors 403
    Code:
    streamlink --http-header "authToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6InRydW9uZ3BodWNyb3NAZ21haWwuY29tIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6InRydW9uZ3BodWNyb3NAZ21haWwuY29tIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoibWVtYmVyIiwidXNlcm5hbWUiOiJ0cnVvbmdwaHVjcm9zQGdtYWlsLmNvbSIsImF2YXRhciI6ImF2YXRhci9ub3Bob3RvM180OHg0OC5naWYiLCJmdWxsbmFtZSI6IlBow7pjIE5ndXnhu4VuIFRyxrDhu51uZyIsImV4cGlyZXMiOiIxNjcyNTkwODg4Iiwic2Vzc2lvbmxvZ2ludG9rZW4iOiI1QkRFOTMwNzBENDA0OTQ4ODY4MjVDRjkwNkI3MDk1NyIsInNlc3Npb25sb2dpbmRldmljZXR5cGUiOiJQQyIsImV4cCI6MTY3MjU5MDg4OCwiaXNzIjoiaHR0cHM6Ly9tb29uLnZuIiwiYXVkIjoiaHR0cHM6Ly9tb29uLnZuIn0.fb9ql9OTJP7qJLIWkeBtla-zNy0kBwtCfNPkXXADn2I; mepuzzConfig=%7B%22app_id%22%3A%225zL12Gw9Jr%22%2C%22app_domain%22%3A%22https%3A//moon.vn/%22%2C%22app_status%22%3A10%2C%22public_key%22%3Anull%2C%22not_ask_allow_in_day%22%3A0%2C%22notif_wellcome%22%3A%7B%22status%22%3A1%2C%22data%22%3A%7B%22title%22%3A%22%5B%u01AFU%20%u0110%C3I%5D%20CH%C0O%20N%u0102M%20H%u1ECCC%20M%u1EDAI%20V%u1EDAI%20S%C1CH%20ID%22%2C%22body%22%3A%22Nh%E2n%20d%u1ECBp%20khai%20gi%u1EA3ng%2005/9%2C%20%20SALE%20s%E1ch%20ID%20c%F2n%2085k/%20cu%u1ED1n.%20%u01AFu%20%u0111%E3i%20%E1p%20d%u1EE5ng%20%u0111%u1EBFn%20h%u1EBFt%2010/09%22%2C%22icon%22%3A%22https%3A//i.imgur.com/Zkqqc81.jpg%22%2C%22image%22%3A%22https%3A//i.imgur.com/jdToojw.jpg%22%2C%22url%22%3A%22https%3A//moon.vn/sach-id-tu-sach-luyen-thi-dai-hoc%23utm_source%3Dmepuzz%26utm_medium%3Dpushweb%26utm_campaign%3Dnewvisitor%22%7D%7D%7D; bannerStaticArray=%5B%7B%22id%22%3A%2261c20d4d385c214e2d020911%22%2C%22opt%22%3A%7B%22timeout%22%3A0%2C%22timeout_off%22%3A0%2C%22display%22%3A%22always%22%2C%22device%22%3A%22desktop%22%2C%22segment%22%3A%5B%5D%7D%7D%2C%7B%22id%22%3A%2261c20f477f69524931135604%22%2C%22opt%22%3A%7B%22timeout%22%3A0%2C%22timeout_off%22%3A0%2C%22display%22%3A%22always%22%2C%22device%22%3A%22mobile%22%2C%22segment%22%3A%5B%5D%7D%7D%5D; bannerConfig=%5B%2261c20d4d385c214e2d020911%22%5D" "hls://https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/124821/Cau-01-24.smil/chunklist_w292079638_b1044100.m3u8?moontokenendtime=1641055028&moontokenhash=vqx4VIHqcKa7prcSutpVESpGXTX-VcEacxhJg2LHzxM%3D&moontokenstarttime=1641054968" best -o "Cau-01-24.mp4"
    Image
    [Attachment 62672 - Click to enlarge]


    Someone, please help me to solve this problem. Thank you very much.
    Quote Quote  
  2. Originally Posted by ndivia1997 View Post
    Hello,
    I have issues when downloading the m3u8 file.
    You can see in here
    Without the mother page its a bit like pissing in the wind to help you, we need the url of the page you are trying to download from and any login credentials - plus you may not have the correct m3u8; but...

    --http-cookie for the user-agent is wrong for a start - see your first CODE box, you are either using a cookie or user-agent, you can use both (and more) but you cant intermix the syntax, this should be:

    Code:
    streamlink --http-header "User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36" "m3u8-url" best -o output.mp4
    The cookie isn't the authtoken either. If you want to use a cookie use:

    Code:
    streamlink --http-header "cookie=xxxxxxxxxxxx" "m3u8-url" best -o output.mp4
    Or both:

    Code:
    streamlink --http-header "cookie=xxxxxxxxxxxx" --http-header "User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36" "m3u8-url" best -o output.mp4
    But if you're getting a 403 its more likely referer that's required

    Code:
    streamlink --http-header "referer=xxxxxxxxx" "m3u8-url" best -o output.mp4
    Auth Token is best passed as authorization and may / may not expire fast, you will most doubt need a fresh one now.

    Code:
    streamlink --http-header "authorization=eyxxxxxxxxxxxxxxxxxx" "m3u8-url" best -o output.mp4
    Last edited by codehound; 1st Jan 2022 at 15:07.
    Quote Quote  
  3. Member
    Join Date
    Dec 2016
    Location
    Việt Nam
    Search Comp PM
    Thanks for your method of downloading videos. I tried those methods, but it still has 403 errors.

    The website where I want to download the video is
    Code:
    https://moon.vn
    . You can register an account and watch the video at this link
    Code:
    https://moon.vn/video/id/122810/0
    .
    Quote Quote  
  4. signup YOU a new fake account for us and write here login data, if you want some help ...
    Quote Quote  
  5. Member
    Join Date
    Dec 2016
    Location
    Việt Nam
    Search Comp PM
    Originally Posted by lomero View Post
    signup YOU a new fake account for us and write here login data, if you want some help ...
    Sorry, this is my mistake. This is a fake account
    Code:
    khoadatgenz
    &UgAwi&4xmHL
    And you can test with this URL
    Code:
    https://moon.vn/video/id/122810/0
    Quote Quote  
  6. Code:
    yt-dlp --allow-u https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/122810/01-bai-31-cac-dac-trung-co-ban-cua-quan-the-p1.mp4/playlist.m3u8?moontokenendtime=1641230529&moontokenhash=fu2bfmpqH7j4h_kPcNPLafn0O6npo3dUtbBW4LDHy0k=&moontokenstarttime=1641230469
    Quote Quote  
  7. Member
    Join Date
    Dec 2016
    Location
    Việt Nam
    Search Comp PM
    Originally Posted by lomero View Post
    Code:
    yt-dlp --allow-u https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/122810/01-bai-31-cac-dac-trung-co-ban-cua-quan-the-p1.mp4/playlist.m3u8?moontokenendtime=1641230529&moontokenhash=fu2bfmpqH7j4h_kPcNPLafn0O6npo3dUtbBW4LDHy0k=&moontokenstarttime=1641230469
    Thank you. I have tried with your method it still shows an error. And I wrap it with a double-quote; it is still the same.
    Image
    [Attachment 62727 - Click to enlarge]

    Image
    [Attachment 62728 - Click to enlarge]
    Quote Quote  
  8. need fresh m3u8. expired soon. try tris

    Code:
    https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/122810/01-bai-31-cac-dac-trung-co-ban-cua-quan-the-p1.mp4/playlist.m3u8?moontokenendtime=1641231807&moontokenhash=v8JN0K2_5UE4DD0jXHi6U-DDriRJ5tGYXVFgX21RESQ=&moontokenstarttime=1641231747

    anyway
    1) video is encrypted. need key to decrypt
    2) streamlink not work with video encrypted
    Last edited by lomero; 3rd Jan 2022 at 11:58.
    Quote Quote  
  9. Code:
    hlsdl -K "1b2c3d4e5f6a7b8c9d1fa29ad6745cde" "https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/122810/01-bai-31-cac-dac-trung-co-ban-cua-quan-the-p1.mp4/chunklist_w1563627055.m3u8?moontokenendtime=1641234694&moontokenhash=eU5yW9PinNruCVxpo-f7oEaRE2kK3zwqsef8NHlpE10%3D&moontokenstarttime=1641234634"
    Image
    [Attachment 62729 - Click to enlarge]


    To get videos like this, you need to get the key via debugging and preferably use hlsdl for downloading.
    Here's hlsdl
    https://siasky.net/_AGwWgXqKxBMiPnZ-FQiMxZweDjDHbVtATvemIxZvaxDvQ

    To get the key, open developer tools -> network
    You are searching for "auth", this is where you get the key but it's encrypted!

    Image
    [Attachment 62730 - Click to enlarge]


    If you open the initiator tab, you will see all the javascript files "responsible" for this element.
    What we need here is to click on key-loader.js (can you guess what this does by the name? Unbelievable!)

    Image
    [Attachment 62731 - Click to enlarge]


    Now here you see some javascript code. What we want to do now, is to stop the code at some point. Can you guess which one? Exactly, right when the key gets decrypted -> line 64
    So we right click that line and add a breakpoint.
    Now we reload the page and it will stop before fully loading the video, but it will load a bunch of stuff, including the key decryption.
    It will look like this

    Image
    [Attachment 62732 - Click to enlarge]


    On the right side you can see I've clicked on response -> data -> Uint8Array(16)
    This is our key, however, it's not in hex.
    To get this key in hex, we can use a simple python script (copy this in Notepad, save it as whatever.py, run cmd in that folder and type whatever.py and press enter. You need to have Python installed for this)

    Code:
    import binascii
    array_alpha = [ 27, 44, 61, 78, 95, 106, 123, 140, 157, 31, 162, 154, 214, 116, 92, 222 ]
    print(bytes(array_alpha).hex())
    this will print
    Code:
    1b2c3d4e5f6a7b8c9d1fa29ad6745cde
    and that's our key.

    Tada!
    click click2
    If I/my posts ever helped you, and you want to give back, send me a private message!
    Quote Quote  
  10. Member
    Join Date
    Dec 2016
    Location
    Việt Nam
    Search Comp PM
    Originally Posted by [ss]vegeta View Post
    Code:
    hlsdl -K "1b2c3d4e5f6a7b8c9d1fa29ad6745cde" "https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/122810/01-bai-31-cac-dac-trung-co-ban-cua-quan-the-p1.mp4/chunklist_w1563627055.m3u8?moontokenendtime=1641234694&moontokenhash=eU5yW9PinNruCVxpo-f7oEaRE2kK3zwqsef8NHlpE10%3D&moontokenstarttime=1641234634"
    Image
    [Attachment 62729 - Click to enlarge]


    To get videos like this, you need to get the key via debugging and preferably use hlsdl for downloading.
    Here's hlsdl
    https://siasky.net/_AGwWgXqKxBMiPnZ-FQiMxZweDjDHbVtATvemIxZvaxDvQ

    To get the key, open developer tools -> network
    You are searching for "auth", this is where you get the key but it's encrypted!

    Image
    [Attachment 62730 - Click to enlarge]


    If you open the initiator tab, you will see all the javascript files "responsible" for this element.
    What we need here is to click on key-loader.js (can you guess what this does by the name? Unbelievable!)

    Image
    [Attachment 62731 - Click to enlarge]


    Now here you see some javascript code. What we want to do now, is to stop the code at some point. Can you guess which one? Exactly, right when the key gets decrypted -> line 64
    So we right click that line and add a breakpoint.
    Now we reload the page and it will stop before fully loading the video, but it will load a bunch of stuff, including the key decryption.
    It will look like this

    Image
    [Attachment 62732 - Click to enlarge]


    On the right side you can see I've clicked on response -> data -> Uint8Array(16)
    This is our key, however, it's not in hex.
    To get this key in hex, we can use a simple python script (copy this in Notepad, save it as whatever.py, run cmd in that folder and type whatever.py and press enter. You need to have Python installed for this)

    Code:
    import binascii
    array_alpha = [ 27, 44, 61, 78, 95, 106, 123, 140, 157, 31, 162, 154, 214, 116, 92, 222 ]
    print(bytes(array_alpha).hex())
    this will print
    Code:
    1b2c3d4e5f6a7b8c9d1fa29ad6745cde
    and that's our key.

    Tada!
    Wow. It's great. I have downloaded the video without error. Thank you so much.
    Quote Quote  
  11. Member
    Join Date
    Aug 2022
    Location
    Portugal
    Search Comp PM
    Originally Posted by [ss]vegeta View Post
    Code:
    hlsdl -K "1b2c3d4e5f6a7b8c9d1fa29ad6745cde" "https://614b17082f29c.streamlock.net/vod2/_definst_/Enctyption_65654654/122810/01-bai-31-cac-dac-trung-co-ban-cua-quan-the-p1.mp4/chunklist_w1563627055.m3u8?moontokenendtime=1641234694&moontokenhash=eU5yW9PinNruCVxpo-f7oEaRE2kK3zwqsef8NHlpE10%3D&moontokenstarttime=1641234634"
    Image
    [Attachment 62729 - Click to enlarge]


    To get videos like this, you need to get the key via debugging and preferably use hlsdl for downloading.
    Here's hlsdl
    https://siasky.net/_AGwWgXqKxBMiPnZ-FQiMxZweDjDHbVtATvemIxZvaxDvQ

    To get the key, open developer tools -> network
    You are searching for "auth", this is where you get the key but it's encrypted!

    Image
    [Attachment 62730 - Click to enlarge]


    If you open the initiator tab, you will see all the javascript files "responsible" for this element.
    What we need here is to click on key-loader.js (can you guess what this does by the name? Unbelievable!)

    Image
    [Attachment 62731 - Click to enlarge]


    Now here you see some javascript code. What we want to do now, is to stop the code at some point. Can you guess which one? Exactly, right when the key gets decrypted -> line 64
    So we right click that line and add a breakpoint.
    Now we reload the page and it will stop before fully loading the video, but it will load a bunch of stuff, including the key decryption.
    It will look like this

    Image
    [Attachment 62732 - Click to enlarge]


    On the right side you can see I've clicked on response -> data -> Uint8Array(16)
    This is our key, however, it's not in hex.
    To get this key in hex, we can use a simple python script (copy this in Notepad, save it as whatever.py, run cmd in that folder and type whatever.py and press enter. You need to have Python installed for this)

    Code:
    import binascii
    array_alpha = [ 27, 44, 61, 78, 95, 106, 123, 140, 157, 31, 162, 154, 214, 116, 92, 222 ]
    print(bytes(array_alpha).hex())
    this will print
    Code:
    1b2c3d4e5f6a7b8c9d1fa29ad6745cde
    and that's our key.

    Tada!
    hello how are you bro ?
    i was able to record the channel. only now appears erro 403. did sonething change in the link? i have the key
    error:
    Last edited by jonatasants; 6th Nov 2022 at 07:20.
    Quote Quote  



Similar Threads

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