Giter VIP home page Giter VIP logo

Comments (3)

zandhaas avatar zandhaas commented on June 7, 2024

The scraper debugger returns:

recipe_scrapers was unable to scrape this URL

from mealie.

Kuchenpirat avatar Kuchenpirat commented on June 7, 2024

So it seems (as already suggested in the Discord by other members of the team) that the scraper is being blocked by the website.

All i can get out of the scraper is the domain and via html mode the following "Access Denied" Message.

b'<HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don\'t have permission to access "http&#58;&#47;&#47;www&#46;ah&#46;nl&#47;allerhande&#47;recept&#47;R&#45;R1199309&#47;courgettelasagne&#45;met&#45;3&#45;kazen&#45;en&#45;gehakt" on this server.<P>\nReference&#32;&#35;18&#46;84601302&#46;1703930024&#46;5a077ebe\n</BODY>\n</HTML>\n'

I'll be closing this, as there is not much mealie can do against that.

from mealie.

bilhert avatar bilhert commented on June 7, 2024

I ran into the same issue. Doing some additional research gave me the following insights:
ah.nl/allerhande uses TLS fingerprinting detection to do bot detection.

A regular request with insomnia gave the same results as reported here.
however when using a tls spoofer proxy (https://github.com/LyleMi/ja3proxy)
and making sure the "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0" and "Accept-Encoding:" header were set resulted in a correct result. (note accept-encoding only needed to be present the value does not matter)

Thus this issue may easily be resolved if the request is altered in such a way that this information is send with the scrape request.

tls spoofing can be directly build into mealie perhaps to be used optionally or by allowing the use of a proxy

additionally the "Accept" header should probably be set next to the user-agent

https://github.com/mealie-recipes/mealie/blob/mealie-next/mealie/services/scraper/scraper_strategies.py
https://github.com/mealie-recipes/mealie/blob/mealie-next/mealie/services/recipe/recipe_data_service.py

from mealie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.