Coder Social home page Coder Social logo

loglux / learnvideodownloader Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

LearnVideoDownloader is a Python script designed to download videos, audios and subtitles from the Microsoft Learn platform. The script allows users to specify the quality of videos and the preferred languages for subtitles.

Python 100.00%
ms-learn python-downloader video-downloader

learnvideodownloader's Introduction

LearnVideoDownloader

LearnVideoDownloader is a Python script designed to download videos, audios and subtitles from the Microsoft Learn platform. The script allows users to specify the quality of videos and the preferred languages for subtitles.

Features

  • Download videos in high, medium, or low quality.
  • Download audio files.
  • Download subtitles in specified languages.

Important

  • Downloads videos and audio files in their original quality without re-encoding.

Requirements

  • Python 3.x
  • Requests library
  • BeautifulSoup library

Installation

  1. Clone the repository:
git clone https://github.com/loglux/LearnVideoDownloader.git

Navigate to the project directory:

cd LearnVideoDownloader

Install the required libraries:

pip install requests beautifulsoup4

Usage:

Edit the urls list in the script to include the URLs of the Microsoft Learn videos you want to download.

Set your preferred languages for subtitles by modifying the preferred_languages list.

Run the script:

python learn_video_helper.py

Example:

if __name__ == "__main__":
    urls = [
        "https://learn.microsoft.com/en-us/shows/on-demand-instructor-led-training-series/ai-050-module-1/",
        "https://learn.microsoft.com/en-us/shows/on-demand-instructor-led-training-series/ai-050-module-2/",
        # Add more URLs as needed
    ]
    preferred_languages = ['en-us', 'ru-ru']  # Example preferred languages: English and Russian subtitles
    for url in urls:
        downloader = VideoDownloader(url)
        downloader.run(download_high_quality=True,
                       download_medium_quality=False,
                       download_low_quality=False,
                       download_audio=True,
                       download_captions=True,
                       preferred_languages=preferred_languages)

Fetch All Links in a Video Series

The LearnVideoFetcher script extends the functionality of the main project by dynamically generating URLs for a series of videos based on a specified base URL and number of modules.

Usage:

To fetch all links in a video series, follow these steps: Run the Script:

python fetch_all_links.py [base_url] [num_modules]

Replace [base_url] with any URL from the series and [num_modules] with the total number of modules in the series.

Example:

Suppose you have a series with a URL like "https://learn.microsoft.com/en-us/shows/on-demand-instructor-led-training-series/ai-900-module-3" and there are 7 modules in the series. You can generate URLs dynamically by passing the URL as it is:

python fetch_all_links.py https://learn.microsoft.com/en-us/shows/on-demand-instructor-led-training-series/ai-900-module-3 7

This script will automatically generate URLs for modules 1 through 7 and download their associated content.

Fetch Links from File

In addition to the existing functionality, the script allows you to fetch and download content from a text file containing a list of links.

How to Use:

  1. Save your list of links in a file (for example, links.txt).
  2. Run the script, specifying the file path that contains the links:
python fetch_from_file.py links.txt --languages en-us ru-ru

In this command, --languages is an optional argument to specify the preferred languages for subtitles. This script should correctly process each link from your file and perform the necessary operations with each of them, including downloading videos and subtitles.

License

This project is licensed under the MIT License.

learnvideodownloader's People

Contributors

loglux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.