Javascript data import

Hi
I am trying to import recipe data with javascript

I use that to have the ingredients and the instructions no problems
window.AppInventor.setWebViewString(document.getElementsByClassName("mrtn-recette_ingredients-items")[0].innerText+"||"+document.getElementsByClassName("recipe-step-list")[0].innerText).

but when i want to get how many portion this line

or
I try : window.AppInventor.setWebViewString(document.querySelectorAll("div[mrtn-recette_ingredients-counter]")[0].innerText) and window.AppInventor.setWebViewString(document.getElementsByClassName("mrtn-recette_ingredients-counter")[0].innerText)

and i can t have this data .Same thing for the picture at this line

with this command

window.AppInventor.setWebViewString(document.querySelectorAll("meta[property="og:image"]")[0].innerText)

For the number of portions you want:

<input class="recipe-ingredients__qt-counter__value title-5" type="text" value="6" min="1" max="50" aria-label="counter">

Not clear from what you ask which image it is you are trying to capture.

1 Like

I try to capture the value of portion and the picture of the recipe
with a javascript command to put them in my recipe book app like i did with the instruction and the ingredient

thanks i didn t understand at the beginning

1 Like