Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

asche910/VideoHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoHelper

主要功能:完成一些主流网站的视频下载任务

相应的功能在爬虫的首选语言python都有实现,这里的目的是只是对java的挚爱以及对爬虫的练习

目前支持:Bilibili(支持av和ep等类型)、知乎、第一视频网

使用方式一:代码中使用,导入VideoHelper.jar

然后:

  // 首先完成初始化;这里playUrl就是视频的播放地址, outputDir则是视频下载的保存目录
  // 其中 outputDir = System.getProperty("user.dir"); 可以保存至运行目录或自定义
  BaseSite base = UrlRecognition.reconize(playUrl, outputDir);
  // 然后再下载
  base.downloadByUrl(playUrl, outputDir);

使用方式二:cmd或bash,下载VideoHelper.jar

然后: cmd或bash里面

  // 后面outputDir可选
  java -jar VideoHelper.jar playUrl outputDir
  

如图:

image

使用方式三:图形界面,运行VideoHelperGUI.jar

运行方式同上(但要注意这均需要java运行环境jre) 如图:

image

知乎教程介绍参照这里: https://www.cnblogs.com/asche/p/9664987.html