VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Member
    Join Date
    Nov 2002
    Location
    Australia
    Search Comp PM
    There is one particular vid in a substack post that I would like at least a link to but preferably a way to download.

    It is the one introduced by simplicius like this:

    For the first time, we now have some actual details from a trustworthy source, in this case the German-Russian journalist Alina Lipp. You can listen to her account below and decide for yourself what to believe as far as the details:

    But I can't find any way to do anything with it. I tried the firefox addon 'substack video downloader' but it seemed to do nothing at all.

    I put the page URL in yt-dlp and it says 'page type newsletter' is not supported.

    here is the page: https://simplicius76.substack.com/p/sitrep-5124-the-russian-steamroller?utm_source=pos...m_medium=email


    Any help?
    Quote Quote  
  2. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    That site is a complete mess. Can't even distinguish the m3u8s and see which one goes for which video.

    Code:
    import re
    
    import requests
    
    
    def get_url(source_url, video_index):
        response = requests.get(source_url).content.decode()
        matches = re.findall('data-component-name="VideoEmbedPlayer" id="media-([^"]+)"', response)
    
        current_index = 0
        if video_index > 0:
            current_index = video_index - 1
            matches = [matches[current_index]]
    
        video_urls = []
        for media_id in matches:
            current_index += 1
            response = requests.get(
                f'https://simplicius76.substack.com/api/v1/video/upload/{media_id}/src',
                allow_redirects=False
            )
    
            video_urls.append((current_index, response.headers["Location"]))
        return video_urls
    
    
    urls = get_url(
        source_url="https://simplicius76.substack.com/p/sitrep-5124-the-russian-steamroller?publication_id=1351274&post_id=144144149&isFreemail=true&r=2ld2be",
        video_index=11
    )
    for i, u in urls:
        print(f"Video index: {i} // Video url: {u}\n")
    Output (shortened the url because it contained a token):
    Code:
    Video index: 11 // Video url: https://stream.mux.com/AyDz00FQ1CWIBpu1yc005Vh12ozEe63Q7s01FOplSjiWRQ/medium.mp4?token=ey...
    Your file:
    https://www.transfernow.net/dl/20240502rbkStvI5

    I tested the python script with other simplicus pages. Seems to be working. Just gotta edit the source page url and the video index in the script. The index starts from 1 and represents what specific video you want from that page. If it's set to 0 or negative, it gets all the videos from that page.
    Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 2nd May 2024 at 04:21.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  3. Member
    Join Date
    Nov 2002
    Location
    Australia
    Search Comp PM
    That's wonderful, really is. Thanks a lot.
    It is nice to have that. Now I can spread it around to people/places that wouldn't want to be bothered with Simplicius's posts.
    I guess I just run the python script from the command line?
    Edit source page URL is fine. But video index? Just manually count them down the page or I could put something in there so's it would just get all of them, the urls for them?
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by abrogard View Post
    I guess I just run the python script from the command line?
    You run it like a normal python script. From cmd. Obviously you need to install python before.
    Code:
    python random_script.py
    Originally Posted by abrogard View Post
    Edit source page URL is fine. But video index? Just manually count them down the page or I could put something in there so's it would just get all of them, the urls for them?
    The videos have to be counted from top to bottom if you want something specifically. Your post title contained:
    Originally Posted by abrogard
    any way to download selected vids from a substack post?
    and your first comment:
    Originally Posted by abrogard View Post
    There is one particular vid in a substack post that I would like
    Naturally, I assumed you were only interested in filtering and extracting specific content. Regardless I edited the posted script. All the urls point to mp4, so grab one in browser and right click save as.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. Member
    Join Date
    Nov 2002
    Location
    Australia
    Search Comp PM
    Yep, sure. You did exactly as I was asking for. I'm not complaining. Did I give you that impression? Nope.

    Yep I have python. Use it from time to time but I don't 'know' it. I get help from gpt and try to make little utilities and sometimes it works and sometimes it doesn't:

    gpt is pretty stupid I find and gets stupider and stupider when fault finding. Which is kinda good now I've learned that. For it makes me step in and start figuring the code which, of course, is what I ought to do.

    I'm just old and lazy now. Work averse. I don't want to learn a language just for a little desktop app. Like I download Yahoo transcripts and wanted to make subtitles out of them. Is all. Just for one particular movie. Me and gpt worked for a couple or more days with dozens of attempts and I never finished up with a smooth procedure. Abandoned the whole thing. I vaguely think I found there's places on the web maybe that do it for you.

    But that's the sort of thing.

    I have military maps covering the whole of ukraine. each map covers a specific long and lat area of course. I wanted a routine that would save me the trouble of googling where a place was and then looking to find which map. ie. a routine where I could input the lat and long for that place and out would come the map number. that was a lengthy try, try, try, try again thing, too.. abandoned in the end....

    And back to where we were - sorry about the digression, second glass of wine, late at night, I start to babble, yes I did only want specific content, that one vid. I queried the 'general get them all' thing lest it turned out to be harder to find the index number for the one you want than just counting down from the top. Remembering what you said about it being a total mess. I thought it possible their index numbers were all mixed up and might be easier for me to just get the lot. Not that it would be 'easier' in the end for I'd then have to look through them all and find which one I wanted but I mean it would be then the easiest way to ensure I got the one I wanted.

    yep. Hey... thanks for your help.
    Quote Quote  
  6. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by abrogard View Post
    Yep, sure. You did exactly as I was asking for. I'm not complaining. Did I give you that impression? Nope.
    I'm not complaining either. No one is complaining. It just seemed funny to me you wanted X and then asked for Y. That's all. No worries.

    Originally Posted by abrogard View Post
    Remembering what you said about it being a total mess. I thought it possible their index numbers were all mixed up and might be easier for me to just get the lot.
    The only thing that is a mess about that site is the m3u8 management mechanism. If you filter in network requests for a m3u8 you have no idea which one is for which video. However, the video index position is set in stone for all pages from top to bottom. That's why I used that to distinguish requested videos since it's a constant (even if it might be tedious to obtain that information, the alternative would have been to input directly the media id, but lots of people don't know how to inspect the html page or what is that even about).

    Originally Posted by abrogard View Post
    yep. Hey... thanks for your help.
    You're welcome.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  7. Member
    Join Date
    Nov 2002
    Location
    Australia
    Search Comp PM
    Hi again,

    I just tried your script for the first time and running python3 got an error

    PS C:\WINDOWS\system32> python3 E:\downsubstackvid.py
    Traceback (most recent call last):
    File "E:\downsubstackvid.py", line 3, in <module>
    import requests
    ModuleNotFoundError: No module named 'requests'

    did i screw something up with the copy paste somehow?


    p.p.s.

    I can't see how to insert code the way you did else I'd put my current version of your code up.
    p.s. looking for the only vid on here this time. https://mcddd.substack.com/p/falling-between-two-stools

    I set this:

    urls = get_url(
    source_url="https://simplicius76.substack.com/p/sitrep-5124-the-russian-steamroller?publication_id=1351274&post_id=1441441 49&isFreemail=true&r=2ld2be",
    video_index=0

    to 'index=0' because of what you said about the indexes and in order to make it 'general purpose' even if at the cost of downloading too much. In fact I rarely do this and usually there's very few vids.
    Last edited by abrogard; 28th Sep 2024 at 19:11.
    Quote Quote  
  8. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by abrogard View Post
    There is one particular vid in a substack post that I would like at least a link to but preferably a way to download.

    It is the one introduced by simplicius like this:

    For the first time, we now have some actual details from a trustworthy source, in this case the German-Russian journalist Alina Lipp. You can listen to her account below and decide for yourself what to believe as far as the details:

    But I can't find any way to do anything with it. I tried the firefox addon 'substack video downloader' but it seemed to do nothing at all.

    I put the page URL in yt-dlp and it says 'page type newsletter' is not supported.

    here is the page: https://simplicius76.substack.com/p/sitrep-5124-the-russian-steamroller?utm_source=pos...m_medium=email


    Any help?
    here is the video you want - yt-dlp -f mp4 -o '%(title).20s' "https://stream.mux.com/AyDz00FQ1CWIBpu1yc005Vh12ozEe63Q7s01FOplSjiWRQ.m3u 8?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZC I6IkYwMUdzZ2hSRUgzRGNkSjAwZ1loNEpQeDdxb1IzakNUQ0Zo ZHphS2tPaU10YyJ9.eyJleHAiOjE3Mjc2Njk3MDAsImF1ZCI6I nYiLCJzdWIiOiJBeUR6MDBGUTFDV0lCcHUxeWMwMDVWaDEyb3p FZTYzUTdzMDFGT3BsU2ppV1JRIn0.wBniZHLxejsVO38y4UaCS kWBPFUnn5GztpEprLtYAlFBteatwvGP1CAfyXOc7d89bkS_IGG g9bwVMRaEzMS0sROVfZ5LvfRATa0qVl5Jg0vTbUgI8SmWjFl7G pcYQlsZHiOkL_j_WCg1j798kBQhVAQ6UqtzOkCi0NUSZqC421c 8MtXoNbotclmB1Tj109-iojRBIUMYOP5uiPzVky37DfeuzYvi4k6kfw8ELV8qeEPsNrTWP FgzDr55c_TZG7xdcoI7EMp6oRBh7To5RRI7YBZNV8nlCqLA3zK lB-RdnX89dQdPpulan_E-yWwX_juyeIZFX2rwncS3qPtChIQwig"
    Quote Quote  
  9. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by abrogard View Post
    did i screw something up with the copy paste somehow?
    Hello again

    Here's a neat thing about Python that is easily solved. Whenever you see the error
    ModuleNotFoundError: No module named '<module_specific_name>'
    Then it can be fixed by running
    Code:
    pip install <module_specific_name>
    In your case it is
    Code:
    pip install requests
    If the package name doesn't match the one in the error message, you can always just google search the entire error text and you'll get the package name from forums like stack overflow. For example
    https://stackoverflow.com/questions/17309288/importerror-no-module-named-requests

    This isn't complex at all, it's just running 1 command. Now, if you get pip command not recognized, that means you didn't install it when you ran the python installer the first time. To fix it easily, just uninstall python, and reinstall, making sure you select the option to also install pip.

    As for the script, all you have to do is replacing
    Code:
    urls = get_url(
        source_url="https://simplicius76.substack.com/p/sitrep-5124-the-russian-steamroller?publication_id=1351274&post_id=144144149&isFreemail=true&r=2ld2be",
        video_index=11
    )
    from the original with
    Code:
    urls = get_url(
        source_url="https://mcddd.substack.com/p/falling-between-two-stools",
        video_index=1
    )
    Basically just changing the URL and index. Anyway, here's your video from the obtained mp4 URL
    https://www.transfernow.net/dl/202409290c851kMS
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  10. Member
    Join Date
    Nov 2002
    Location
    Australia
    Search Comp PM
    Yep, humbled and helped me all at once again.

    I'm grateful, thanks and I will try to think more before I start look for help....
    Quote Quote  



Similar Threads

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