mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-09 16:18:00 -05:00
reverting scraper to just using wildmode
This commit is contained in:
@@ -6,7 +6,7 @@ from urllib.parse import unquote
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from bs4.element import Tag
|
from bs4.element import Tag
|
||||||
from recipe_scrapers import scrape_html, scrape_me
|
from recipe_scrapers import scrape_html, scrape_me
|
||||||
from recipe_scrapers._exceptions import NoSchemaFoundInWildMode, WebsiteNotImplementedError
|
from recipe_scrapers._exceptions import NoSchemaFoundInWildMode
|
||||||
from recipe_scrapers._utils import get_host_name, normalize_string
|
from recipe_scrapers._utils import get_host_name, normalize_string
|
||||||
|
|
||||||
from cookbook.helper import recipe_url_import as helper
|
from cookbook.helper import recipe_url_import as helper
|
||||||
@@ -69,9 +69,6 @@ def get_recipe_from_source(text, url, request):
|
|||||||
scrape = None
|
scrape = None
|
||||||
|
|
||||||
if url and not text:
|
if url and not text:
|
||||||
try:
|
|
||||||
scrape = scrape_me(url_path=url)
|
|
||||||
except WebsiteNotImplementedError:
|
|
||||||
try:
|
try:
|
||||||
scrape = scrape_me(url_path=url, wild_mode=True)
|
scrape = scrape_me(url_path=url, wild_mode=True)
|
||||||
except(NoSchemaFoundInWildMode):
|
except(NoSchemaFoundInWildMode):
|
||||||
|
|||||||
Reference in New Issue
Block a user