reaper47 / recipya

A clean, simple and powerful recipe manager your whole family will enjoy.
https://recipya.musicavis.ca
GNU General Public License v3.0
187 stars 11 forks source link

Scrape from https://app.samsungfood.com #399

Open jesp1999 opened 2 months ago

jesp1999 commented 2 months ago

Is your feature request related to a problem? Please describe. I'm trying to migrate from Samsung Food but some recipes are only on that platform (not linked from other platforms). Currently, the only way to migrate these recipes is manually.

Describe the solution you'd like I'd like to be able to input a link such as https://app.samsungfood.com/recipes/107018afe8e54d07e9689b87dd6f857b15f into the import page and have the scraper pull the recipe in from this page.

Describe alternatives you've considered Manually inputting the data from the recipe page.

Additional context N/A

reaper47 commented 2 months ago

I am struggling to understand how the recipe page is populated. From what I understand, there's a POST request made to https://app.samsungfood.com/api/grpc-web/whisk.x.recipe.v1.RecipeAPI/GetRecipe with some kind of gRPC request body, which returns some kind of encoded grpc-web body. Assuming the response is base64 encoded, decoding it reveals the content of the recipe.

I will look into this later as I'm not familiar with gRPC.

image

jesp1999 commented 2 months ago

Hey, yeah it seems like it might be a pain to scrape, which is why I submitted an issue before attempting it myself 😅 I'll look into this if I have the time but won't complain if you happen to get to it first!