Skip to content

Scrape Live Stream URL #114

Scrape Live Stream URL

Scrape Live Stream URL #114

name: Scrape Live Stream URL
on:
schedule:
# Run the job every hour (adjust this as needed)
- cron: '0 * * * *'
workflow_dispatch: # Allow manual trigger
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Ensure correct Node.js version
- name: Install Puppeteer
run: npm install puppeteer
- name: Run Puppeteer script and capture output
run: |
node puppeteer-script.js | tee puppeteer_output.txt
- name: Display captured .m3u8 URL
run: |
cat puppeteer_output.txt
grep 'Captured m3u8 URL:' puppeteer_output.txt || echo "No .m3u8 URL found."