Code Monkey home page Code Monkey logo

m3u8's Introduction

m3u8

Total alerts Language grade: Python

a simple tool for downloading and merging video fragments, which may be encrypted, listed in m3u8 file

environment

  • Linux, Windows 10, macOS
  • python3 with pip

install

git clone https://github.com/eagleoflqj/m3u8
cd m3u8
# read requirements.txt, then it's up to you whether use a virtual environment or not
python3 -m pip install -r requirements.txt

usage

In the directory that contains scrapy.cfg.

scrapy crawl m3u8 -a m3u8='m3u8 file url' [-a merge=...] [-a referer=...]

or

scrapy crawl m3u8 -a page='html page url' [-a merge=...]
  • Assign anything to merge to prevent the spider from merging fragments. This is useful when some head or tail fragments contain ads. Once you remove these .ts files, you can merge video fragments manually:
python3 m3u8/merge_ts.py 'directory that contains all video fragments'
  • Only assign STATIC html page that contains m3u8 file URL to page. Note that this is not always the case, so you may F12 first to get the m3u8 URL, then set m3u8 (and referer if needed).

m3u8's People

Contributors

eagleoflqj 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.