GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - soul-cat/DouYinSign: web版抖音采集的一种解决方案

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
cone
cone
 
 
README.md
README.md
 
 
app.py
app.py
 
 

Repository files navigation

DouYinSign

web版抖音采集的一种解决方案,通过这种方法生成的签名可以百分百拿到数据。

抖音web接口关闭,项目终结

目的

批量采集抖音数据

原理

通过Flask搭建起一个Web服务,在里面维护一个Selenium进程,让抖音网页帮我们生成_signature签名

获取浏览器ua

http://service.spiritsoft.cn/ua.html

坑点

抖音网页端会检测浏览器环境(具体是检测什么并不太清楚,我试了用特殊方法使chrome的webdriver=undefine并不能解决问题),被检测的结果就是拿不到数据,可以不设置无头浏览器看一下。

  • 解决方案

使用firefox56版本配合geckodriver,可能其他版本也可以不过我没试,因为我电脑上正好有56版

2020-5-2新增问题

因为不是公司项目一直没管过它,最近发现linux上部署的时候在几十小时之后会出现selenium请求不到抖音网页的情况。这就导致生成signature所必须的一个tac变量无法被刷新,生成的signature参数自然就没有用了。

  • 解决

tac变量传到服务器上,linux上的浏览器只生成参数的js代码,不做任何请求动作。需要注意的是,获取tac的时候ua需要与服务器上浏览器的ua相同,同理拿着签名请求接口的时候也需要有相同ua。目前没有发现对IP有限制,这样也算解决了selenium切换代理ip的繁琐步骤。

最近公司事情比较多代码只是完成了一个大概,就不上传了,照着思路可以完美抓数据

About

web版抖音采集的一种解决方案

Resources

Readme
Activity

Stars

19 stars

Watchers

1 watching

Forks

13 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.