|
|
2 jaren geleden | |
|---|---|---|
| conf | 2 jaren geleden | |
| test | 2 jaren geleden | |
| .gitignore | 2 jaren geleden | |
| bililive_api.py | 2 jaren geleden | |
| client_detection.py | 2 jaren geleden | |
| detect_list.py | 2 jaren geleden | |
| detection.py | 2 jaren geleden | |
| main.py | 2 jaren geleden | |
| readme.md | 2 jaren geleden | |
| requirements.txt | 2 jaren geleden | |
| task.py | 2 jaren geleden |
http://g1879.gitee.io/drissionpagedocs/get_start/installation_and_import/#_2
conda create -p env --file requirements.txt
pip install DrissionPage
驱动: http://chromedriver.storage.googleapis.com/index.html
谷歌浏览器历史版本: https://vikyd.github.io/download-chromium-history-version/#/
有些版本无法正常运行 Chrome(119.0.6045.124),建议使用可以驱动的版本: 107.0.5304.107
DrissionPage 官方Linux教程: https://blog.csdn.net/sinat_39327967/article/details/132181129?spm=1001.2014.3001.5501
[107.0.5304.107](https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1047731%2Fchrome-linux.zip?generation=1663284576100523&alt=media)
wget https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1047731%2Fchrome-linux.zip?generation=1663284576100523&alt=media
unzip Linux_x64_1047731_chrome-linux.zip
pip install "uvicorn[standard]"
pip install fastapi
uvicorn main:app --port 9081
''' GET / list detect list
Request:
method: GET
path: http://127.0.0.1:9081/
Response:
[{'str': 1}, {'str': 2}, {'str': 3}]
'''
''' Add live
Request:
method: POST
path: http://127.0.0.1:9081/
body:
[
{
"str": "https://live.bilibili.com/14917277",
},
{
"str": "https://live.bilibili.com/14917277",
}
]
Response:
[
{
"res": "https://live.bilibili.com/14917277",
},
{
"res": "https://live.bilibili.com/14917277",
}
]
'''