hhursev / recipe-scrapers

Python package for scraping recipes data
MIT License
1.7k stars 518 forks source link

blue apron issue #1041

Closed erkead closed 6 months ago

erkead commented 6 months ago

Pre-filing checks

The URL of the recipe(s) that are not being scraped correctly

The results you expect to see

Imported into Mealie

The results (including any Python error messages) that you are seeing

"Looks Like We Couldn't Find Anything

Only websites containing ld+json or microdata can be imported by Mealie. Most major recipe websites support this data structure. If your site cannot be imported but there is json data in the log, please submit a github issue with the URL and data."

strangetom commented 6 months ago

The error looks like a result of bot detection by BlueApron. This is the HTML that is returned from the request

<html>
    <head>
        <title>blueapron.com</title>
        <style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}
        </style>
    </head>
    <body style="margin:0">
        <p id="cmsg">Please enable JS and disable any ad blocker</p>
        <script data-cfasync="false">var dd={'rt':'c','cid':'AHrlqAAAAAMA79y3jufCNykAbZntNQ==','hsh':'F3AD613367B7A9A05F49CB61F3AC0B','t':'fe','s':37086,'e':'469cec30cf59fa45bbb42c9522125215f8c3a1ea9df73385434b88c05d0ccf74','host':'geo.captcha-delivery.com'}
        </script>
        <script data-cfasync="false" src="https://ct.captcha-delivery.com/c.js"></script>
    </body>
</html>

I don't know if we can do anything to fix this here.

erkead commented 6 months ago

No biggie. I have the links and copy and paste will get me where I need to add them to my mealie manually since there's only a dozen or so that we enjoyed from our time subscribed, but if there's no potential fix it may be worth removing BA from the "Scrapers available for" section. Thanks for looking into it.