converted ingredient parser to class and added automation beta hint

This commit is contained in:
vabene1111
2021-09-16 17:52:11 +02:00
parent ecd300d2db
commit a7dc23194e
28 changed files with 505 additions and 337 deletions

View File

@@ -10,7 +10,7 @@ from recipe_scrapers._utils import get_host_name, normalize_string
from urllib.parse import unquote
def get_recipe_from_source(text, url, space):
def get_recipe_from_source(text, url, request):
def build_node(k, v):
if isinstance(v, dict):
node = {
@@ -103,7 +103,7 @@ def get_recipe_from_source(text, url, space):
parse_list.append(el)
scrape = text_scraper(text, url=url)
recipe_json = helper.get_from_scraper(scrape, space)
recipe_json = helper.get_from_scraper(scrape, request)
for el in parse_list:
temp_tree = []