Nav apraksta

mrh 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
conf 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
test 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
.gitignore 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
bililive_api.py 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
client_detection.py 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
detect_list.py 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
detection.py 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
main.py 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
readme.md 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
requirements.txt 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ
task.py 54a9414084 基本完成FastAPI添加直播间;扫描直播间 2 gadi atpakaļ

readme.md

介绍

http://g1879.gitee.io/drissionpagedocs/get_start/installation_and_import/#_2

conda create -p env --file requirements.txt

pip install DrissionPage

安装 Linux Chrome

驱动: 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

FastAPI

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",
            }
        ]
    

    '''