mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
fixed youtube importer
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user