diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index a6d91f84c..aeae86f83 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -28,7 +28,9 @@ def get_from_scraper(scrape, request): source_url = scrape.url except Exception: pass - if source_url: + if source_url == "https://urlnotfound.none" or not source_url: + recipe_json['source_url'] = '' + else: recipe_json['source_url'] = source_url try: keywords.append(source_url.replace('http://', '').replace('https://', '').split('/')[0]) diff --git a/cookbook/locale/sl/LC_MESSAGES/django.po b/cookbook/locale/sl/LC_MESSAGES/django.po index 5a557092c..b6679d2dd 100644 --- a/cookbook/locale/sl/LC_MESSAGES/django.po +++ b/cookbook/locale/sl/LC_MESSAGES/django.po @@ -8,17 +8,17 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-08-01 15:04+0200\n" -"PO-Revision-Date: 2023-08-13 08:19+0000\n" -"Last-Translator: Miha Perpar \n" +"PO-Revision-Date: 2024-08-21 16:58+0000\n" +"Last-Translator: \"Matjaž T.\" \n" "Language-Team: Slovenian \n" "Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" -"%100==4 ? 2 : 3;\n" -"X-Generator: Weblate 4.15\n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 5.6.2\n" #: .\cookbook\forms.py:45 msgid "" @@ -89,14 +89,16 @@ msgid "" "Long Lived Access Token for your HomeAssistant instance" msgstr "" +"Dolgoročen dostopni žeton za vašo HomeAssistant instanco" #: .\cookbook\forms.py:193 msgid "Something like http://homeassistant.local:8123/api" -msgstr "" +msgstr "Nekaj podobnega http://homeassistant.local:8123/api" #: .\cookbook\forms.py:205 msgid "http://homeassistant.local:8123/api for example" -msgstr "" +msgstr "http://homeassistant.local:8123/api na primer" #: .\cookbook\forms.py:222 .\cookbook\views\edit.py:117 msgid "Storage" @@ -202,45 +204,49 @@ msgid "" "Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods " "only function with fulltext fields." msgstr "" +"Polja za iskanje po celotnem besedilu. Opomba: metode iskanja 'web', " +"'phrase' in 'raw' delujejo samo s polnimi besedilnimi polji." #: .\cookbook\forms.py:350 msgid "Search Method" -msgstr "" +msgstr "Metoda iskanja" #: .\cookbook\forms.py:350 msgid "Fuzzy Lookups" -msgstr "" +msgstr "Mehka iskanja" #: .\cookbook\forms.py:350 msgid "Ignore Accent" -msgstr "" +msgstr "Prezri naglas" #: .\cookbook\forms.py:350 msgid "Partial Match" -msgstr "" +msgstr "Delno ujemanje" #: .\cookbook\forms.py:350 msgid "Starts With" -msgstr "" +msgstr "Se začne s/z" #: .\cookbook\forms.py:351 msgid "Fuzzy Search" -msgstr "" +msgstr "Mehko iskanje" #: .\cookbook\forms.py:351 msgid "Full Text" -msgstr "" +msgstr "Celotno besedilo" #: .\cookbook\helper\AllAuthCustomAdapter.py:41 msgid "" "In order to prevent spam, the requested email was not send. Please wait a " "few minutes and try again." msgstr "" +"Da bi preprečili vsiljeno pošto, zahtevana e-pošta ni bila poslana. " +"Počakajte nekaj minut in poskusite znova." #: .\cookbook\helper\permission_helper.py:164 #: .\cookbook\helper\permission_helper.py:187 .\cookbook\views\views.py:117 msgid "You are not logged in and therefore cannot view this page!" -msgstr "" +msgstr "Niste prijavljeni in si zato ne morete ogledati te strani!" #: .\cookbook\helper\permission_helper.py:168 #: .\cookbook\helper\permission_helper.py:174 @@ -253,48 +259,46 @@ msgstr "" #: .\cookbook\helper\permission_helper.py:341 .\cookbook\views\data.py:35 #: .\cookbook\views\views.py:127 .\cookbook\views\views.py:131 msgid "You do not have the required permissions to view this page!" -msgstr "" +msgstr "Nimate potrebnih dovoljenj za ogled te strani!" #: .\cookbook\helper\permission_helper.py:192 #: .\cookbook\helper\permission_helper.py:215 #: .\cookbook\helper\permission_helper.py:237 #: .\cookbook\helper\permission_helper.py:252 msgid "You cannot interact with this object as it is not owned by you!" -msgstr "" +msgstr "S tem predmetom ne morete komunicirati, ker ni v vaši lasti!" #: .\cookbook\helper\permission_helper.py:402 msgid "You have reached the maximum number of recipes for your space." -msgstr "" +msgstr "Dosegli ste največje število receptov za svoj prostor." #: .\cookbook\helper\permission_helper.py:414 msgid "You have more users than allowed in your space." -msgstr "" +msgstr "V vašem prostoru imate več uporabnikov, kot je dovoljeno." #: .\cookbook\helper\recipe_url_import.py:310 -#, fuzzy -#| msgid "Use fractions" msgid "reverse rotation" -msgstr "Uporabi ulomke/frakcije" +msgstr "obratno vrtenje" #: .\cookbook\helper\recipe_url_import.py:311 msgid "careful rotation" -msgstr "" +msgstr "previdno vrtenje" #: .\cookbook\helper\recipe_url_import.py:312 msgid "knead" -msgstr "" +msgstr "gnetemo" #: .\cookbook\helper\recipe_url_import.py:313 msgid "thicken" -msgstr "" +msgstr "zgostimo" #: .\cookbook\helper\recipe_url_import.py:314 msgid "warm up" -msgstr "" +msgstr "pogrejemo" #: .\cookbook\helper\recipe_url_import.py:315 msgid "ferment" -msgstr "" +msgstr "fermentiramo" #: .\cookbook\helper\recipe_url_import.py:316 msgid "sous-vide" @@ -302,7 +306,7 @@ msgstr "" #: .\cookbook\helper\shopping_helper.py:150 msgid "You must supply a servings size" -msgstr "" +msgstr "Navesti morate velikost obrokov" #: .\cookbook\helper\template_helper.py:95 #: .\cookbook\helper\template_helper.py:97 diff --git a/cookbook/views/api.py b/cookbook/views/api.py index f2e5fafe6..ac0f52c27 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -1527,9 +1527,9 @@ class RecipeUrlImportView(APIView): data = "" except JSONDecodeError: pass - scrape = scrape_html(html=data, org_url=url, supported_only=False) + scrape = scrape_html(html=data, org_url='https://urlnotfound.none', supported_only=False) if not url and (found_url := scrape.schema.data.get('url', 'https://urlnotfound.none')): - scrape = scrape_html(text=data, url=found_url, supported_only=False) + scrape = scrape_html(html=data, org_url=found_url, supported_only=False) if scrape: return Response({