Fetch Stream URL #18
This file contains hidden or 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: Fetch Stream URL | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| url: | |
| description: "The URL to scrape for m3u8 links (override default)" | |
| required: true | |
| default: "https://news.abplive.com/live-tv" | |
| jobs: | |
| fetch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Install Google Chrome (stable) | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y wget gnupg2 ca-certificates unzip | |
| wget -q -O /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| sudo apt-get install -y /tmp/google-chrome-stable_current_amd64.deb || sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb || true | |
| # show chrome version | |
| google-chrome --version || true | |
| - name: Run Selenium script (🟢CLICK HERE TO VIEW RESULTS) | |
| env: | |
| TARGET_URL: ${{ github.event.inputs.url }} | |
| run: | | |
| echo -e "Running Selenium Script." | |
| python fetch_stream.py | tee puppeteer_output.txt | |