this post was submitted on 22 Aug 2024
17 points (90.5% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

54655 readers
584 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

📜 c/Piracy Wiki (Community Edition):


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 1 year ago
MODERATORS
 

Torrenting this show isn't an option. Every torrent I've tried has this specific episode missing, with a duplicate episode in its place. Most of the streaming sites do, too. The only stream I've found is on vidsrc.me, and I can't for the life of me figure out how to download it.

I've searched around and found multiple recommendations for video downloader sites, and several people suggested the Firefox extension DownThemAll!, but I've had no luck. It's a generic "can't find video" message every time.

I'm guessing these apps and sites worked at some point but they updated their API. Hoping against hope that someone who's done it recently can tell me how they did it.

you are viewing a single comment's thread
view the rest of the comments
[–] Minera@discuss.online 1 points 2 months ago (1 children)

I've been doing this with Selenium+SeleniumWire in Python. Here's a basic script that will open a (Selenium) Firefox instance, load the URL passed in, wait for you to click through the various popups etc. and shell out to yt-dlp to download the m3u8. Requires Python, Firefox, and yt-dlp. I don't see any reason it wouldn't work on platforms other than Linux, but I haven't tested at all. It could be updated to click through the play button/popups automatically but I cbf.

Script

#!/usr/bin/env python3
import sys
import threading
import subprocess
import selenium.webdriver
from seleniumwire import webdriver

firefox_opts = selenium.webdriver.FirefoxOptions()
b = webdriver.Firefox(options = firefox_opts)

done = threading.Event()
cmdline = None

def res_interceptor(req, res) -> None:
    global cmdline
    if req.url.endswith('master.m3u8'):
        headers = dict(req.headers)
        cmdline = ['yt-dlp', '--referer', headers.get('referer', ''), req.url]
        done.set()

b.response_interceptor = res_interceptor
b.get(sys.argv[1])
done.wait()
b.quit()
assert cmdline is not None
print(f"Command line: {' '.join(cmdline)}")
subprocess.run(cmdline)

UsageInstall Python packages:

$ pip install selenium selenium-wire blinker==1.7.0

Run the script (redacted example output):

$ python ./getm3u.py 'https://vidsrc.me/embed/[-]'
Command line: yt-dlp --referer https://[-].com/ https://tmstr.[-].com/stream_new/d6BoyFydhIoAEakvYTGZHhYA7A9aEkwpA1SDsb1Xxd3fYFxxaPzUvIost8zBAjouTHLFNGFwRy/master.m3u8
[generic] Extracting URL: https://tmstr.[-].com/stream_new/d6BoyFydhIoAEakvYTGZHhYA7A9aEkwpA1SDsb1Xxd3fYFxxaPzUvIost8zBAjouTHLFNGFwRy/master.m3u8
[generic] master: Downloading webpage
[generic] master: Downloading m3u8 information
[info] master: Downloading 1 format(s): 2701
[hlsnative] Downloading m3u8 manifest
WARNING: Live HLS streams are not supported by the native downloader. If this is a livestream, please add "--downloader ffmpeg --hls-use-mpegts" to your command
[hlsnative] Total fragments: 955
[download] Destination: master [master].mp4
[download]   0.7% of ~   2.35GiB at  989.83KiB/s ETA 34:15 (frag 7/955)

If code isn't your thing OP I'd be happy to run it on your URL and send the downloaded file over Matrix or something.

[–] Alice@beehaw.org 1 points 2 months ago

Oh thanks! I kinda lost track of this thread as soon as the work week started, but I'll give this a shot soon.