Open litianyu0707 opened 1 month ago
I seemed to have a similar issue with truenas scale, but I seem to have fixed it. Make sure that the docker / jail / instance can see the Internet directly. I had to enable host network on my truenas app install.
After this I was able to get it to work with your link.
Try with this one:
https://www.novachef.cat/receptes/truita-patates
Also try that link or yours on the demo site. Then try to share the recipe, and use that shared link into your installation. If that doesn't even work for you then there's something else broken, I suspect from your network interface.
First Check
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] 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
hello , i set up mealie by unraid docker market. i can't add any recipe by URL, but in the demo website i can add it normaly.![image](https://github.com/user-attachments/assets/11ff2fe1-7c12-4a3d-9f77-56d6e2824692)
such as: https://sallysbakingaddiction.com/lemon-sweet-rolls/
Please provide your logs for the Mealie container
docker logs <container-id> > mealie.logs
recipe, extras = await create_from_url(req.url, self.translator) File "/app/mealie/services/scraper/scraper.py", line 34, in create_from_url new_recipe, extras = await scraper.scrape(url) File "/app/mealie/services/scraper/recipe_scraper.py", line 40, in scrape raw_html = await safe_scrape_html(url) File "/app/mealie/services/scraper/scraper_strategies.py", line 47, in safe_scrape_html async with client.stream( File "/usr/local/lib/python3.10/contextlib.py", line 199, in aenter return await anext(self.gen) File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1617, in stream response = await self.send( File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1661, in send response = await self._send_handling_auth( File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1689, in _send_handling_auth response = await self._send_handling_redirects( File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects response = await self._send_single_request(request) File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1763, in _send_single_request response = await transport.handle_async_request(request) File "/app/mealie/pkgs/safehttp/transport.py", line 73, in handle_async_request raise InvalidDomainError(f"invalid request on local resource: {request.url} -> {ip}") mealie.pkgs.safehttp.transport.InvalidDomainError: invalid request on local resource: https://sallysbakingaddiction.com/lemon-sweet-rolls/ -> 198.18.131.233 ERROR 2024-08-09T21:38:22 - Exception in ASGI application Traceback (most recent call last): File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi result = await app( # type: ignore[func-returns-value] File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call return await self.app(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call raise exc File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call await self.app(scope, receive, _send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call await responder(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call await self.app(scope, receive, self.send_with_gzip) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 756, in call await self.middleware_stack(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 72, in app response = await func(request) File "/app/mealie/routes/_base/routers.py", line 35, in custom_route_handler response = await original_route_handler(request) File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) File "/app/mealie/routes/recipe/recipe_crud_routes.py", line 203, in parse_recipe_url recipe, extras = await create_from_url(req.url, self.translator) File "/app/mealie/services/scraper/scraper.py", line 34, in create_from_url new_recipe, extras = await scraper.scrape(url) File "/app/mealie/services/scraper/recipe_scraper.py", line 40, in scrape raw_html = await safe_scrape_html(url) File "/app/mealie/services/scraper/scraper_strategies.py", line 47, in safe_scrape_html async with client.stream( File "/usr/local/lib/python3.10/contextlib.py", line 199, in aenter return await anext(self.gen) File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1617, in stream response = await self.send( File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1661, in send response = await self._send_handling_auth( File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1689, in _send_handling_auth response = await self._send_handling_redirects( File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects response = await self._send_single_request(request) File "/opt/pysetup/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1763, in _send_single_request response = await transport.handle_async_request(request) File "/app/mealie/pkgs/safehttp/transport.py", line 73, in handle_async_request raise InvalidDomainError(f"invalid request on local resource: {request.url} -> {ip}") mealie.pkgs.safehttp.transport.InvalidDomainError: invalid request on local resource: https://sallysbakingaddiction.com/lemon-sweet-rolls/ -> 198.18.131.233
Deployment
Docker (Linux)