bug fix url import

This commit is contained in:
smilerz
2021-04-05 21:41:00 -05:00
parent c50bd039ef
commit 4bc4ce0d7c
6 changed files with 63 additions and 117 deletions

View File

@ -82,7 +82,12 @@ def get_recipe_from_source(text, url, space):
html_data = get_from_html(soup)
images += get_images_from_source(soup, url)
for el in soup.find_all('script', type='application/ld+json'):
parse_list.append(remove_graph(el))
el = remove_graph(el)
if type(el) == list:
for l in el:
parse_list.append(l)
else:
parse_list.append(el)
for el in soup.find_all(type='application/json'):
parse_list.append(remove_graph(el))