Git Product home page Git Product logo

douyin's Introduction

抖音推荐/搜索页视频列表视频爬虫方案

最近测试可用时间:2021.06.20

adb暂未实现进入搜索页的操作,请根据自身技术栈实现相关点击操作及键入关键词等

老版本请切换到old分支查看,old分支使用anyproxy抓取,更适合大多数人使用

基于APP爬取

技术栈:golang adb

特点

  • 可设置仅抓取大于xx赞的视频
  • 可自定义设置是否下载远程文件到本地

使用

  1. 安装mitm-proxy.crt证书到相关设备,虚拟机或真机

  2. 复制 config.example.tomlconfig.toml,并根据自己需求修改参数

  3. 运行本项目程序 go run main.go 或 编辑运行

  4. 若开启下载会生成一个 database.db的sqlite3数据库文件,字符详见model/videos.go文件,静态文件(用户头像,视频封面图,视频文件)将放在download/[avatar,cover,video]目录下

  5. 最后根据个人需要上传处理即可

待优化的地方

  • 一直滑动请求推荐列表,APP会异常退出,所以暂时的方法是每爬取一段时间(配置文件里可自定义)后,强制关闭APP,重新打开继续爬取

  • 目前个人在用的雷电模拟器,长时间运行会卡死,暂不清楚是系统原因还是模拟器原因,有测试能稳定运行环境的朋友,方便的话请告诉我,谢谢

最后说明

  • 个人能力一般,有很多编码不规范的地方请包涵
  • 有能力的朋友可以根据个人需求修改,如果可以请提交pr
  • 如果使用有问题,请提交issues 或加我同名微信号,请备注github过来的,谢谢

Stargazers over time

Stargazers over time

Thanks

gorm.io/gorm
github.com/ouqiang/goproxy
github.com/spf13/viper

Development Tool (IDE) For Jetbrains

Thanks for Jetbrains Open Source Licenses.

捐赠

douyin's People

Contributors

cnbattle avatar

Stargazers

 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.