Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
/ XMQ-BackUp Public archive

A crawler for backing up XMQ's groups, topics, pictures, and files.

License

Notifications You must be signed in to change notification settings

Lodour/XMQ-BackUp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMQ-BackUp

小密圈备份,圈子/话题/图片/文件。

Usage

  1. 安装 chromedriver

仅用于自动登录,如果你愿意自己抓包,则不需要安装

  • brew install chromedriver
  • 或前往官网/镜像下载
    • 将包含可执行文件的目录添加至环境变量
    • 或设置settings.py/CHROME_DRIVER_PATH为完整执行路径
  1. 安装 XMQ-BackUp
git clone git@github.com:Lodour/XMQ-BackUp.git
cd XMQ-BackUp
mv xmq/settings.exammple.py xmq/settings.py
virtualenv env -p python3.5
source ./env/bin/activate
pip install -r requirements.txt
  1. 运行
  • scrapy crawl backup
  • 手动指定tokenUser-Agent
    • 浏览器端登录后抓包获取request headers中的authorizationUser-Agent字段
    • xmq/settings.py末尾将其设置为XMQ_ACCESS_TOKENXMQ_USER_AGENT  

Note

  • phantomjs渲染所得到的access_token不合法,所以换成了chromedriver
  • virtualenv下使用scrapy有问题的请参照这里
  • 如果你的浏览器版本有更新,是需要重新设置UA的。
  • 欢迎交流

About

A crawler for backing up XMQ's groups, topics, pictures, and files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages