Scrape Live Stream URL #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |