Skip to content

✨添加jiuse示例配置文件,定义作者信息和视频列表结构 #356

✨添加jiuse示例配置文件,定义作者信息和视频列表结构

✨添加jiuse示例配置文件,定义作者信息和视频列表结构 #356

Workflow file for this run

name: Pornhub爬取上传缤纷云

Check failure on line 1 in .github/workflows/pornhub.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pornhub.yml

Invalid workflow file

(Line: 4, Col: 12): Unexpected value ''
on:
schedule:
# 每 7 小时执行一次
# - cron: '0 */7 * * *'
workflow_dispatch: # 允许手动触发工作流
jobs:
crawl_pornhub:
runs-on: ubuntu-22.04 # 使用22.04的 Ubuntu 运行环境
steps:
- name: Checkout code
uses: actions/checkout@v2 # 检出代码
- name: Use Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10.11' # 使用 Python 3.10.11 版本
- name: Install dependencies
run: |
sudo apt-get update # 更新 apt 包列表
sudo apt-get install ffmpeg -y # 安装 ffmpeg
sudo apt-get install -y ca-certificates # 安装根证书
python -m pip install --upgrade pip # 更新 pip
pip install -r requirements.txt # 安装项目依赖
- name: Run Crawler Script
run: |
python main.py # 根据项目结构,运行爬虫脚本
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }} # 从 GitHub Secrets 中获取 MongoDB URI
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} # 从 GitHub Secrets 中获取 S3 Endpoint
S3_REGION: ${{ secrets.S3_REGION }} # 从 GitHub Secrets 中获取 S3 Region
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} # 从 GitHub Secrets 中获取 S3 Access Key
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} # 从 GitHub Secrets 中获取 S3 Secret Key
S3_BUCKET: ${{ secrets.S3_BUCKET }} # 从 GitHub Secrets 中获取 S3 Bucket