diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 104a3de..6b72d0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,14 +42,16 @@ jobs: - name: Download yt-dlp run: curl -L https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp -o yt-dlp && chmod +x ./yt-dlp - name: Install and build server dependencies - run: cd server/ && yarn install --frozen-lockfile && npx tsc + run: | + cd server/ && yarn install --frozen-lockfile && npx tsc + cp -aT . $HOME/bgutil-ytdlp-pot-provider/server - name: Install plugin run: | mkdir ~/yt-dlp-plugins && curl -L "https://github.com/coletdjnz/yt-dlp-get-pot/releases/download/v0.1.1/yt-dlp-get-pot.zip" -o ~/yt-dlp-plugins/yt-dlp-get-pot.zip cp -aT plugin/ ~/yt-dlp-plugins/bgutil-ytdlp-pot-provider/ - name: Test script method run: | - script_response=$(./yt-dlp -vF --print-traffic BaW_jenozKc --extractor-args "youtube:getpot_bgutil_script=server/build/generate_once.js" 2>&1) || echo "::error title=Failed to run yt-dlp when testing script::yt-dlp returned $? exit status" + script_response=$(./yt-dlp -vF --print-traffic BaW_jenozKc 2>&1) || echo "::error title=Failed to run yt-dlp when testing script::yt-dlp returned $? exit status" echo $script_response if [[ "$script_response" != *"BgUtilScriptPot: Generating POT via script"* ]]; then echo "::error title=BgUtilScriptPot was not invoked,file=plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py::BgUtilScriptPot was not invoked" diff --git a/plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py b/plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py index 98649b1..c7ccf66 100644 --- a/plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py +++ b/plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py @@ -46,7 +46,6 @@ def _validate_get_pot(self, client: str, ydl: YoutubeDL, visitor_data=None, data 'Incorrect script passed to extractor args. Path to generate_once.js required') if shutil.which('node') is None: raise UnsupportedRequest('node is not in PATH') - raise UnsupportedRequest self.script_path = script_path def _get_pot(self, client: str, ydl: YoutubeDL, visitor_data=None, data_sync_id=None, player_url=None, **kwargs) -> str: