diff --git a/src/updater.py b/src/updater.py index 4265c0fdd28..fa6a0a3091b 100644 --- a/src/updater.py +++ b/src/updater.py @@ -103,7 +103,7 @@ def exception_writer(error: Exception, name: str, end_program: bool = False) -> f.write(f'# :bangbang: **Exception Occurred** :bangbang:\n\n```txt\n{error}\n```\n\n') if end_program: - raise error + sys.exit(0) # exit without error to allow rest of GitHub workflow steps to run def igdb_authorization(client_id: str, client_secret: str) -> dict: @@ -475,8 +475,10 @@ def check_youtube(data: dict) -> str: # determine if playlist # https://www.youtube.com/watch?v=&list=&index=<1-based-index> - if '&list=' in url or '?list=' in url: - url = url.split('&list=')[0] + for symbol in ['&', '?']: + if f'{symbol}list=' in url: + url = url.split(f'{symbol}list=')[0] + break # url provided, now process it using youtube_dl youtube_dl_params = dict(