Skip to content

Commit

Permalink
fixed youtube importer
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Nov 23, 2024
1 parent d4dc4a3 commit 98c95a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cookbook/helper/recipe_url_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98c95a9

Please sign in to comment.