Skip to content

Torrent Scraper

Torrent Scraper #8

name: Torrent Scraper
on:
schedule:
- cron: "0 */8 * * *" # Запуск кожні 8 годин
workflow_dispatch: # Дозволяє ручний запуск workflow
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4 bencodepy # Встановлює залежності, якщо вони не включені
- name: Run the script
run: |
python hydra_links_igruha.py
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git stash # Stash any uncommitted changes
git pull --rebase # Pull the latest changes from the remote repository
git stash pop # Apply stashed changes bac
git add .
git commit -m "Update JSON file with latest torrent data" || echo "No changes to commit"
git push