diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 76159c2..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Python: 当前文件", - "type": "python", - "request": "launch", - "program": "${file}", - "console": "integratedTerminal", - "args": ["https://live.douyin.com/162574996168"] - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b98b726..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cSpell.words": [ - "douyin", - "mitmproxy" - ] -} \ No newline at end of file diff --git a/README.md b/README.md index 8221ba5..20875cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -抖音web直播间([live.douyin.com](https://live.douyin.com))弹幕抓取 +抖音web直播间([live.douyin.com](https://live.douyin.com))弹幕抓取 -- **屏幕效果截图** diff --git a/__pycache__/selenium.cpython-39.pyc b/__pycache__/selenium.cpython-39.pyc deleted file mode 100644 index a753417..0000000 Binary files a/__pycache__/selenium.cpython-39.pyc and /dev/null differ diff --git a/config/__pycache__/__init__.cpython-38.pyc b/config/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 8e9ddf5..0000000 Binary files a/config/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/config/__pycache__/__init__.cpython-39.pyc b/config/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index e9825a5..0000000 Binary files a/config/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/config/__pycache__/helper.cpython-38.pyc b/config/__pycache__/helper.cpython-38.pyc deleted file mode 100644 index 33ae2ff..0000000 Binary files a/config/__pycache__/helper.cpython-38.pyc and /dev/null differ diff --git a/config/__pycache__/helper.cpython-39.pyc b/config/__pycache__/helper.cpython-39.pyc deleted file mode 100644 index c018293..0000000 Binary files a/config/__pycache__/helper.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/__init__.cpython-38.pyc b/messages/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 6708204..0000000 Binary files a/messages/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/__init__.cpython-39.pyc b/messages/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index 21bc1e7..0000000 Binary files a/messages/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/base.cpython-38.pyc b/messages/__pycache__/base.cpython-38.pyc deleted file mode 100644 index 6c0835d..0000000 Binary files a/messages/__pycache__/base.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/base.cpython-39.pyc b/messages/__pycache__/base.cpython-39.pyc deleted file mode 100644 index ac480e6..0000000 Binary files a/messages/__pycache__/base.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/chat.cpython-38.pyc b/messages/__pycache__/chat.cpython-38.pyc deleted file mode 100644 index 3286eb3..0000000 Binary files a/messages/__pycache__/chat.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/chat.cpython-39.pyc b/messages/__pycache__/chat.cpython-39.pyc deleted file mode 100644 index c74fe53..0000000 Binary files a/messages/__pycache__/chat.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/gift.cpython-38.pyc b/messages/__pycache__/gift.cpython-38.pyc deleted file mode 100644 index 1bab226..0000000 Binary files a/messages/__pycache__/gift.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/gift.cpython-39.pyc b/messages/__pycache__/gift.cpython-39.pyc deleted file mode 100644 index c3aa897..0000000 Binary files a/messages/__pycache__/gift.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/like.cpython-38.pyc b/messages/__pycache__/like.cpython-38.pyc deleted file mode 100644 index 7f6268d..0000000 Binary files a/messages/__pycache__/like.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/like.cpython-39.pyc b/messages/__pycache__/like.cpython-39.pyc deleted file mode 100644 index e1c23dd..0000000 Binary files a/messages/__pycache__/like.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/member.cpython-38.pyc b/messages/__pycache__/member.cpython-38.pyc deleted file mode 100644 index 550c9f9..0000000 Binary files a/messages/__pycache__/member.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/member.cpython-39.pyc b/messages/__pycache__/member.cpython-39.pyc deleted file mode 100644 index f2d9c77..0000000 Binary files a/messages/__pycache__/member.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/roomuserseq.cpython-38.pyc b/messages/__pycache__/roomuserseq.cpython-38.pyc deleted file mode 100644 index 20474b2..0000000 Binary files a/messages/__pycache__/roomuserseq.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/roomuserseq.cpython-39.pyc b/messages/__pycache__/roomuserseq.cpython-39.pyc deleted file mode 100644 index 3eac0d5..0000000 Binary files a/messages/__pycache__/roomuserseq.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/social.cpython-38.pyc b/messages/__pycache__/social.cpython-38.pyc deleted file mode 100644 index 3a691c1..0000000 Binary files a/messages/__pycache__/social.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/social.cpython-39.pyc b/messages/__pycache__/social.cpython-39.pyc deleted file mode 100644 index 46f97ae..0000000 Binary files a/messages/__pycache__/social.cpython-39.pyc and /dev/null differ diff --git a/messages/__pycache__/utils.cpython-38.pyc b/messages/__pycache__/utils.cpython-38.pyc deleted file mode 100644 index 3d3ad16..0000000 Binary files a/messages/__pycache__/utils.cpython-38.pyc and /dev/null differ diff --git a/messages/__pycache__/utils.cpython-39.pyc b/messages/__pycache__/utils.cpython-39.pyc deleted file mode 100644 index b31cddc..0000000 Binary files a/messages/__pycache__/utils.cpython-39.pyc and /dev/null differ diff --git a/protobuf/__pycache__/__init__.cpython-38.pyc b/protobuf/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index a98949a..0000000 Binary files a/protobuf/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/protobuf/__pycache__/__init__.cpython-39.pyc b/protobuf/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index 95b3744..0000000 Binary files a/protobuf/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/protobuf/__pycache__/message_pb2.cpython-38.pyc b/protobuf/__pycache__/message_pb2.cpython-38.pyc deleted file mode 100644 index 435b34f..0000000 Binary files a/protobuf/__pycache__/message_pb2.cpython-38.pyc and /dev/null differ diff --git a/protobuf/__pycache__/message_pb2.cpython-39.pyc b/protobuf/__pycache__/message_pb2.cpython-39.pyc deleted file mode 100644 index f448528..0000000 Binary files a/protobuf/__pycache__/message_pb2.cpython-39.pyc and /dev/null differ diff --git a/protobuf/__pycache__/wss_pb2.cpython-38.pyc b/protobuf/__pycache__/wss_pb2.cpython-38.pyc deleted file mode 100644 index 0cd79c0..0000000 Binary files a/protobuf/__pycache__/wss_pb2.cpython-38.pyc and /dev/null differ diff --git a/scripts/__init__.py b/scripts/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/__pycache__/__init__.cpython-38.pyc b/scripts/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index ffb1d1b..0000000 Binary files a/scripts/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/scripts/__pycache__/__init__.cpython-39.pyc b/scripts/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index b3a67ec..0000000 Binary files a/scripts/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/scripts/__pycache__/mitmproxy.cpython-38.pyc b/scripts/__pycache__/mitmproxy.cpython-38.pyc deleted file mode 100644 index e450e26..0000000 Binary files a/scripts/__pycache__/mitmproxy.cpython-38.pyc and /dev/null differ diff --git a/scripts/__pycache__/mitmproxy.cpython-39.pyc b/scripts/__pycache__/mitmproxy.cpython-39.pyc deleted file mode 100644 index abd43d5..0000000 Binary files a/scripts/__pycache__/mitmproxy.cpython-39.pyc and /dev/null differ diff --git a/scripts/__pycache__/utils.cpython-39.pyc b/scripts/__pycache__/utils.cpython-39.pyc deleted file mode 100644 index 32fb11f..0000000 Binary files a/scripts/__pycache__/utils.cpython-39.pyc and /dev/null differ diff --git a/scripts/__pycache__/watcher.cpython-38.pyc b/scripts/__pycache__/watcher.cpython-38.pyc deleted file mode 100644 index 30d739c..0000000 Binary files a/scripts/__pycache__/watcher.cpython-38.pyc and /dev/null differ diff --git a/scripts/__pycache__/watcher.cpython-39.pyc b/scripts/__pycache__/watcher.cpython-39.pyc deleted file mode 100644 index e7b167e..0000000 Binary files a/scripts/__pycache__/watcher.cpython-39.pyc and /dev/null differ diff --git a/scripts/__pycache__/webdriver.cpython-38.pyc b/scripts/__pycache__/webdriver.cpython-38.pyc deleted file mode 100644 index 735c6d2..0000000 Binary files a/scripts/__pycache__/webdriver.cpython-38.pyc and /dev/null differ diff --git a/scripts/__pycache__/webdriver.cpython-39.pyc b/scripts/__pycache__/webdriver.cpython-39.pyc deleted file mode 100644 index eb22349..0000000 Binary files a/scripts/__pycache__/webdriver.cpython-39.pyc and /dev/null differ diff --git a/scripts/mitmproxy.py b/scripts/mitmproxy.py deleted file mode 100644 index 8169ec3..0000000 --- a/scripts/mitmproxy.py +++ /dev/null @@ -1,25 +0,0 @@ -# ! IMPORT ! make sure you ran mitmproxy with this script, -# eg: `/path/to/mitmproxy -s mitmproxy.py` -import time -from mitmproxy import http -import re -import requests - -session = requests.session() - - -class Writer: - def websocket_message(self, flow: http.HTTPFlow): - re_c = re.search('webcast\d-ws-web-.*\.douyin\.com', flow.request.host) - if re_c: - message = flow.websocket.messages[-1] - if message.from_client: - return - content = message.content - session.post("http://127.0.0.1:5000/message", data=content, headers={ - "X-MITM-TS": str(time.time()), - "X_REFERER": flow.request.host - }, timeout=(1, 1)) - - -addons = [Writer()] diff --git a/scripts/utils.py b/scripts/utils.py deleted file mode 100644 index 5b99707..0000000 --- a/scripts/utils.py +++ /dev/null @@ -1,10 +0,0 @@ -import requests - -from config.helper import config - -def getUserinfo(uid): - try: - r = requests.get(config()['api']['userinfo'] + str(uid)) - return r.json() - except: - pass \ No newline at end of file diff --git a/store/__pycache__/__init__.cpython-38.pyc b/store/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index ac04b65..0000000 Binary files a/store/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/store/__pycache__/__init__.cpython-39.pyc b/store/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index a20f5b6..0000000 Binary files a/store/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/store/__pycache__/mongo.cpython-38.pyc b/store/__pycache__/mongo.cpython-38.pyc deleted file mode 100644 index c2b65ac..0000000 Binary files a/store/__pycache__/mongo.cpython-38.pyc and /dev/null differ diff --git a/store/__pycache__/mongo.cpython-39.pyc b/store/__pycache__/mongo.cpython-39.pyc deleted file mode 100644 index 7e2817f..0000000 Binary files a/store/__pycache__/mongo.cpython-39.pyc and /dev/null differ