diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index aeae86f83..7ac6eae60 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -6,7 +6,7 @@ from django.utils.dateparse import parse_duration from django.utils.translation import gettext as _ from isodate import parse_duration as iso_parse_duration from isodate.isoerror import ISO8601Error -from pytube import YouTube +from pytubefix import YouTube from recipe_scrapers._utils import get_host_name, get_minutes from cookbook.helper.automation_helper import AutomationEngine @@ -274,9 +274,9 @@ def get_from_youtube_scraper(url, request): default_recipe_json['image'] = video.thumbnail_url if video.description: default_recipe_json['steps'][0]['instruction'] = automation_engine.apply_regex_replace_automation(video.description, Automation.INSTRUCTION_REPLACE) - + print('YOUTUBE RESPONSE', default_recipe_json, video.thumbnail_url) except Exception: - pass + traceback.print_exc() return default_recipe_json diff --git a/requirements.txt b/requirements.txt index d5b060fc9..5273135cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,7 +41,7 @@ django-hCaptcha==0.2.0 python-ldap==3.4.4 django-auth-ldap==4.6.0 pyppeteer==2.0.0 -pytube==15.0.0 +pytubefix==8.5.1 aiohttp==3.10.11 inflection==0.5.1 redis==5.2.0