91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5KB
    文件類型: .py
    金幣: 1
    下載: 0 次
    發布日期: 2021-01-09
  • 語言: Python
  • 標簽: python??抖音爬蟲??

資源簡介

用python爬取用戶的抖音視頻,根據用的的id,爬取用的所有視頻

資源截圖

代碼片段和文件信息

#?抖音App視頻下載腳本
#?作者:Charles
#?公眾號:Charles的皮卡丘
import?requests
import?bs4
import?os
import?json
import?re
import?math
import?sys
import?time
import?threading
from?contextlib?import?closing
requests.packages.urllib3.disable_warnings()


#?#?重寫Thread
#?class?StoppableThread(threading.Thread):
#? def?__init__(self?*args?**kwargs):
#? super(StoppableThread?self).__init__()
#? self._stop_event?=?threading.Event()
#? def?stop(self):
#? self._stop_event.set()
#? def?stopped(self):
#? return?self._stop_event.is_set()


class?Spider():
def?__init__(self):
self.headers?=?{
‘User-Agent‘:?‘Mozilla/5.0?(Windows?NT?10.0;?Win64;?x64)?AppleWebKit/537.36?(KHTML?like?Gecko)?Chrome/65.0.3325.146?Safari/537.36‘
}
print(‘[INFO]:Douyin?App?Video?downloader..

評論

共有 條評論