Code Monkey home page Code Monkey logo

91pron_python's Introduction

91pron_python

利用python3,爬取并下载91pron网站上面的视频 该脚本支持一下功能:

  • 支持多线程
  • 下载视频有进度条显示
  • 支持从特定页的特定视频开始下载
  • 将m3u8和mp4格式的视频下载到不同文件夹,加以分类
  • 自动过滤已经下载过的视频

使用方法

  • 首先需要安装python最新版,这里不再教学,网上有很多
  • 安装必要包,脚本文件头部有引用。安装命令:pip install 包名
  • 建议在vs code编辑器,打开项目的demo文件夹,不要直接打开根目录,然后按F5,进入bebug模式

当编译器底部出现如下界面,就代表程序运行成功:
运行成功.png

需要注意的是

由于91pron网站改版,最新的视频采用m3u8格式,本脚本自动将含有m3u8格式的视频链接保存在当前目录的urlwithtitle.txt文本中,每一行用----,将内容分割,左边为视频的url,右边为视频的标题,如图所示:
保存的视频链接格式

然后在项目的根目录找到m3u8DL-CLI这个文件夹,打开它,双击N_m3u8DL-CLI-SimpleG.exe程序,将urlwithtitle.txt拖拽到M3U8地址栏中,点击GO按钮,程序就自动下载分片,最后合并视频
使用方法

下载下来的视频最终保存在m3u8DL-CLI这个文件夹的Downloads文件夹里,打开以后,会发现,视频都是是带有字符串,不是我们想要的,这时候只需要运行一下m3u8DL-CLI目录下的rename.py脚本即可完成重命名. 说明一点,重命名后的视频,需要剪切到根目录的91视频文件夹中,并将urlwithtitle.txt文件内容清空,这么做是为了保证下次运行脚本,过滤已经下载的视频,这点很重要!!!

下载mp4格式的视频就没有这些问题,直接下载,程序也会有进度条显示,不需要额外操作。

91pron_python's People

Contributors

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