Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCRAPER] - Serious Eats #3900

Closed
3 tasks done
egguy opened this issue Jul 17, 2024 · 0 comments · Fixed by #3969
Closed
3 tasks done

[SCRAPER] - Serious Eats #3900

egguy opened this issue Jul 17, 2024 · 0 comments · Fixed by #3969
Assignees
Labels
bug: confirmed bug Something isn't working scraper

Comments

@egguy
Copy link

egguy commented Jul 17, 2024

First Check

  • I used the GitHub search to find a similar issue and didn't find it.

  • I have verified that this issue is not related to the underlying library
    hhyrsev/recipe-scrapers by 1) checking
    the debugger and data is returned, 2)
    verifying that there are errors in the log related to application level code, or
    3) verified that the site provides recipe data, or is otherwise supported by
    hhyrsev/recipe-scrapers

  • This issue can be replicated on the demo site (https://demo.mealie.io/)

Please provide 1-5 example URLs that are having errors

https://www.seriouseats.com/citrus-and-anise-mulled-wine-recipe

Please provide your logs for the Mealie container docker logs <container-id> > mealie.logs

mealie  | ERROR    2024-07-17T23:56:51 - Exception in ASGI application
mealie  | Traceback (most recent call last):
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
mealie  |     result = await app(  # type: ignore[func-returns-value]
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
mealie  |     return await self.app(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
mealie  |     await super().__call__(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
mealie  |     await self.middleware_stack(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
mealie  |     raise exc
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
mealie  |     await self.app(scope, receive, _send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__
mealie  |     await responder(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__
mealie  |     await self.app(scope, receive, self.send_with_gzip)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
mealie  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
mealie  |     raise exc
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
mealie  |     await app(scope, receive, sender)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
mealie  |     await self.middleware_stack(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
mealie  |     await route.handle(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
mealie  |     await self.app(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
mealie  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
mealie  |     raise exc
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
mealie  |     await app(scope, receive, sender)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
mealie  |     response = await func(request)
mealie  |   File "/app/mealie/routes/_base/routers.py", line 35, in custom_route_handler
mealie  |     response = await original_route_handler(request)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
mealie  |     raw_response = await run_endpoint_function(
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
mealie  |     return await dependant.call(**values)
mealie  |   File "/app/mealie/routes/recipe/recipe_crud_routes.py", line 203, in parse_recipe_url
mealie  |     recipe, extras = await create_from_url(req.url, self.translator)
mealie  |   File "/app/mealie/services/scraper/scraper.py", line 34, in create_from_url
mealie  |     new_recipe, extras = await scraper.scrape(url)
mealie  |   File "/app/mealie/services/scraper/recipe_scraper.py", line 43, in scrape
mealie  |     result = await scraper.parse()
mealie  |   File "/app/mealie/services/scraper/scraper_strategies.py", line 236, in parse
mealie  |     return self.clean_scraper(scraped_data, self.url)
mealie  |   File "/app/mealie/services/scraper/scraper_strategies.py", line 190, in clean_scraper
mealie  |     total_time=try_get_default(None, "totalTime", None, cleaner.clean_time, translator=self.translator),
mealie  |   File "/app/mealie/services/scraper/scraper_strategies.py", line 146, in try_get_default
mealie  |     value = clean_func(value, **clean_func_kwargs)
mealie  |   File "/app/mealie/services/scraper/cleaner.py", line 371, in clean_time
mealie  |     return clean_time(value)
mealie  | TypeError: clean_time() missing 1 required positional argument: 'translator'
mealie  | ERROR    2024-07-17T23:56:51 - Exception in ASGI application
mealie  | Traceback (most recent call last):
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
mealie  |     result = await app(  # type: ignore[func-returns-value]
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
mealie  |     return await self.app(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
mealie  |     await super().__call__(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
mealie  |     await self.middleware_stack(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
mealie  |     raise exc
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
mealie  |     await self.app(scope, receive, _send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__
mealie  |     await responder(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__
mealie  |     await self.app(scope, receive, self.send_with_gzip)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
mealie  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
mealie  |     raise exc
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
mealie  |     await app(scope, receive, sender)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
mealie  |     await self.middleware_stack(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
mealie  |     await route.handle(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
mealie  |     await self.app(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
mealie  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
mealie  |     raise exc
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
mealie  |     await app(scope, receive, sender)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
mealie  |     response = await func(request)
mealie  |   File "/app/mealie/routes/_base/routers.py", line 35, in custom_route_handler
mealie  |     response = await original_route_handler(request)
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
mealie  |     raw_response = await run_endpoint_function(
mealie  |   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
mealie  |     return await dependant.call(**values)
mealie  |   File "/app/mealie/routes/recipe/recipe_crud_routes.py", line 203, in parse_recipe_url
mealie  |     recipe, extras = await create_from_url(req.url, self.translator)
mealie  |   File "/app/mealie/services/scraper/scraper.py", line 34, in create_from_url
mealie  |     new_recipe, extras = await scraper.scrape(url)
mealie  |   File "/app/mealie/services/scraper/recipe_scraper.py", line 43, in scrape
mealie  |     result = await scraper.parse()
mealie  |   File "/app/mealie/services/scraper/scraper_strategies.py", line 236, in parse
mealie  |     return self.clean_scraper(scraped_data, self.url)
mealie  |   File "/app/mealie/services/scraper/scraper_strategies.py", line 190, in clean_scraper
mealie  |     total_time=try_get_default(None, "totalTime", None, cleaner.clean_time, translator=self.translator),
mealie  |   File "/app/mealie/services/scraper/scraper_strategies.py", line 146, in try_get_default
mealie  |     value = clean_func(value, **clean_func_kwargs)
mealie  |   File "/app/mealie/services/scraper/cleaner.py", line 371, in clean_time
mealie  |     return clean_time(value)
mealie  | TypeError: clean_time() missing 1 required positional argument: 'translator'

Deployment

Docker (Linux)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working scraper
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants