diff --git a/cookbook/integration/copymethat.py b/cookbook/integration/copymethat.py index a581ab73d..421c967d7 100644 --- a/cookbook/integration/copymethat.py +++ b/cookbook/integration/copymethat.py @@ -24,7 +24,7 @@ class CopyMeThat(Integration): try: source = file.find("a", {"id": "original_link"}).text except AttributeError: - source = '' + source = None recipe = Recipe.objects.create(name=file.find("div", {"id": "name"}).text.strip()[:128], source_url=source, created_by=self.request.user, internal=True, space=self.request.space, ) @@ -58,10 +58,10 @@ class CopyMeThat(Integration): ingredients = file.find("ul", {"id": "recipeIngredients"}) if isinstance(ingredients, Tag): for ingredient in ingredients.children: - if not isinstance(ingredient, Tag) or ingredient.text == "": + if not isinstance(ingredient, Tag) or not ingredient.text.strip() or "recipeIngredient_spacer" in ingredient['class']: continue if any(x in ingredient['class'] for x in ["recipeIngredient_subheader", "recipeIngredient_note"]): - step.ingredients.add(Ingredient.objects.create(is_header=True, note=ingredient.text.strip(), original_text=ingredient.text.strip(), space=self.request.space, )) + step.ingredients.add(Ingredient.objects.create(is_header=True, note=ingredient.text.strip()[:256], original_text=ingredient.text.strip(), space=self.request.space, )) else: amount, unit, food, note = ingredient_parser.parse(ingredient.text.strip()) f = ingredient_parser.get_food(food) diff --git a/requirements.txt b/requirements.txt index 3956181a5..0e183c62a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ Jinja2==3.1.2 django-webpack-loader==1.5.0 git+https://github.com/ierror/django-js-reverse@7cab78c4531780ab4b32033d5104ccd5be1a246a django-allauth==0.51.0 -recipe-scrapers==14.6.0 +recipe-scrapers==14.11.0 django-scopes==1.2.0.post1 pytest==7.1.2 pytest-django==4.5.2 diff --git a/vue/src/locales/fr.json b/vue/src/locales/fr.json index 34fdf3770..282f8428e 100644 --- a/vue/src/locales/fr.json +++ b/vue/src/locales/fr.json @@ -375,5 +375,11 @@ "Documentation": "Documentation", "New_Supermarket": "Créer un nouveau supermarché", "New_Supermarket_Category": "Créer une nouvelle catégorie de supermarché", - "and_down": "& Dessous" + "and_down": "& Dessous", + "recipe_filter": "Filtrer les recettes", + "no_more_images_found": "Pas d'images supplémentaires trouvées sur le site.", + "sql_debug": "Débogage de la base SQL", + "last_cooked": "Dernière recette utilisée", + "times_cooked": "Temps de cuisson", + "show_sortby": "Trier par" } diff --git a/vue/src/locales/pl.json b/vue/src/locales/pl.json index 32d58db24..35e528fd3 100644 --- a/vue/src/locales/pl.json +++ b/vue/src/locales/pl.json @@ -425,5 +425,7 @@ "Message": "Wiadomość", "reset_food_inheritance": "Zresetuj dziedziczenie", "reset_food_inheritance_info": "Zresetuj wszystkie produkty spożywcze do domyślnych dziedziczonych pól i ich wartości nadrzędnych.", - "Valid Until": "Ważne do" + "Valid Until": "Ważne do", + "show_ingredient_overview": "Wyświetl listę wszystkich składników na początku przepisu.", + "Ingredient Overview": "Przegląd składników" } diff --git a/vue/yarn.lock b/vue/yarn.lock index 14e34b9ad..8d83a2441 100644 --- a/vue/yarn.lock +++ b/vue/yarn.lock @@ -10508,9 +10508,9 @@ terser-webpack-plugin@^5.1.1, terser-webpack-plugin@^5.1.3: terser "^5.7.2" terser@^4.1.2, terser@^4.6.2: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== + version "4.8.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" + integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== dependencies: commander "^2.20.0" source-map "~0.6.1"