票圈爬虫平台

wangkun 2a08b606fd update 2 vuotta sitten
common 2a08b606fd update 2 vuotta sitten
kanyikan a654a13503 first push 2 vuotta sitten
main 2a08b606fd update 2 vuotta sitten
weixinzhishu a654a13503 first push 2 vuotta sitten
youtube 2a08b606fd update 2 vuotta sitten
.DS_Store a654a13503 first push 2 vuotta sitten
.gitignore a654a13503 first push 2 vuotta sitten
README.MD 2a08b606fd update 2 vuotta sitten
requirements.txt a654a13503 first push 2 vuotta sitten

README.MD

爬虫平台

启动

  1. cd ./piaoquan_crawler
  2. sh ./main/main.sh ${crawler_dir} ${log_type} ${crawler} ${strategy} ${oss_endpoint} ${env} ${machine} ${nohup_dir}

    参数说明
    ${crawler_dir}:     爬虫执行路径,如: ./youtube/youtube_main/run_youtube_follow.py
    ${log_type}:        日志命名格式,如: follow,则在 youtube/logs/目录下,生成 2023-02-08-follow.log
    ${crawler}:         哪款爬虫,如: youtube / kanyikan / weixinzhishu
    ${strategy}:        爬虫策略,如: 定向爬虫策略 / 小时榜爬虫策略 / 热榜爬虫策略
    ${oss_endpoint}:    OSS网关,内网: inner / 外网: out / 香港: hk
    ${env}:             爬虫运行环境,正式环境: prod / 测试环境: dev
    ${machine}:         爬虫运行机器,阿里云服务器: aliyun_hk / aliyun / macpro / macair / local
    ${nohup_dir}:       nohup日志存储路径,如: ./youtube/nohup.log
    

已上线爬虫运行命令示例

youtube定向榜运行命令: 
sh ./main/main.sh ./youtube/youtube_main/run_youtube_follow.py --log_type="follow" --crawler="youtube" --strategy="定向爬虫策略" --oss_endpoint="hk" --env="dev" --machine="aliyun_hk" ./youtube/nohup.log
youtube定向榜杀进程命令: 
ps aux | grep run_youtube | grep Python | grep -v grep | awk '{print $2}' | xargs kill -9