Skip to content

πŸš€ Update PPVLand Playlist πŸ“Ί #2545

πŸš€ Update PPVLand Playlist πŸ“Ί

πŸš€ Update PPVLand Playlist πŸ“Ί #2545

Workflow file for this run

name: "πŸš€ Update PPVLand Playlist πŸ“Ί"
on:
schedule:
- cron: '0 * * * *' # ⏰ Run every hour
workflow_dispatch:
permissions:
contents: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🐍 Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: πŸ“¦ Install Python dependencies & Playwright
run: |
python -m pip install --upgrade pip
pip install playwright urllib3 aiohttp
playwright install firefox
playwright install-deps
- name: 🎯 Run scraping script
run: python ppv.py
- name: πŸ’Ύ Commit & Safely Push if Playlist Changed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add PPVLand.m3u8
if git diff --cached --quiet; then
echo "βœ… No changes to commit"
exit 0
fi
git commit -m "πŸ” Update playlist $(date -u +'%a %b %d %T UTC %Y')"
sleep $((RANDOM % 10 + 5))
if ! git push origin main; then
echo "⚠️ Push rejected. Trying safe fetch + merge..."
git pull origin main --rebase || {
echo "❌ Rebase failed. Exiting to avoid corruption."
exit 1
}
git push origin main || {
echo "❌ Second push failed. Remote changed again."
exit 1
}
fi