nextcloud / nextcloud/cookbook

Can not import recipes from godt.no

Open
#2,633 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

website support
Dominant language
HTML
Stars
641
Forks
113
Avg merge
21h 31m
Merged PRs (30d)
26

Description

Failing website:

https://www.godt.no/oppskrifter/tilbehoer/11215/mandelsmoer

Checking if valid metadata are present:

Yes, I check the source code of the website and found metadata.

Cookbook version:

Latest

Problem description (if applicable):

The page cannot be imported. The error message is: ...

"No parser found for the given import."

I believe the issue might be that the Recipe is part of a list of ld+json items:

<script type="application/ld+json">
[
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "item": "https://www.godt.no/",
        "name": "godt",
        "position": 1
      },
      {
        "@type": "ListItem",
        "item": "https://www.godt.no/oppskrifter",
        "name": "oppskrifter",
        "position": 2
      },
      {
        "@type": "ListItem",
        "item": "https://www.godt.no/oppskrifter/tilbehoer",
        "name": "Tilbehør",
        "position": 3
      },
      {
        "@type": "ListItem",
        "item": "https://www.godt.no/oppskrifter/tilbehoer/11215/mandelsmoer",
        "name": "Mandelsmør – Enkelt, hjemmelaget pålegg | Video",
        "position": 4
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "Recipe",
    "inLanguage": "nb-NO",
    "isAccessibleForFree": true,
    "mainEntityOfPage": "https://www.godt.no/oppskrifter/tilbehoer/11215/mandelsmoer",
    "publisher": {
      "@type": "Organization",
      "logo": {
        "@type": "ImageObject",
        "height": "1200",
        "url": "https://cdn.godt.no/pro/no/current/assets/meta/logo.png",
        "width": "1200"
      },
      "name": "Godt.no",
      "sameAs": [
        "https://www.facebook.com/godtno",
        "https://instagram.com/godtno"
      ],
      "url": "https://www.godt.no"
    },
    "url": "https://www.godt.no/oppskrifter/tilbehoer/11215/mandelsmoer",
    "author": {
      "@type": "Person",
      "name": "godt.no",
      "url": "https://www.godt.no/bruker/67/godt-no"
    },
    "dateModified": "2025-01-07T11:16:15Z",
    "datePublished": "2024-04-02T08:33:53Z",
    "description": "Hjemmelaget mandelsmør er veldig enkelt - og veldig godt! Slik lager du det med kun to ingredienser. Flere oppskrifter får du på Godt.no.",
    "image": [
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=1080q80"
    ],
    "keywords": "Hverdag, Rask",
    "name": "Mandelsmør – Enkelt, hjemmelaget pålegg | Video",
    "performTime": "PT10M",
    "recipeCategory": "tilbehør",
    "recipeIngredient": [
      "300 g mandler",
      "1 knivsodd salt"
    ],
    "recipeInstructions": [
      {
        "@type": "HowToStep",
        "text": "Forvarm ovnen til 180 grader."
      },
      {
        "@type": "HowToStep",
        "text": "Spre mandlene utover et bakebrett med bakepapir."
      },
      {
        "@type": "HowToStep",
        "text": "Sett brettet i ovnen. La de ligge til det begynner å lukte aromatisk, cirka 3-5 minutter. Obs! Pass på at de ikke svir seg!"
      },
      {
        "@type": "HowToStep",
        "text": "La mandlene avkjøle seg litt. Finn fram blenderen, stavmikseren eller hurtigmikseren."
      },
      {
        "@type": "HowToStep",
        "text": "Når mandlene har fått avkjøle seg, kjører du dem i hurtigmikseren til de blir kornete. Fortsett til konsistensen endrer seg til å bli «smooth» og kremete. OBS! Har du ikke den kraftigste blenderen/stavmikseren/hurtigmikseren, er det lurt å gjøre dette i «pulses», slik at maskinen tåler det."
      },
      {
        "@type": "HowToStep",
        "text": "Tilsett salt etter smak, hell over på et glass og nyt!"
      }
    ],
    "recipeYield": 1,
    "totalTime": "PT10M"
  },
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "contentUrl": "https://dd-vgtv.akamaized.net/vgtv/vod/2024/03/65fbe8d107e348000802b9d2/ps_1080_1920_6073.mp4",
    "description": "Mandelsmør har en heftig kilopris på butikken, men slik kan du lage den - helt selv!",
    "duration": "PT41S",
    "name": "Slik lager du mandelsmør",
    "thumbnailUrl": [
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=180q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=280q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=380q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=480q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=580q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=680q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=780q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=980q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=1080q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=1205q80",
      "https://images.stream.schibsted.media/users/vgtv/images/8771358912bf4332d5edf81e303192af.jpg?t[]=1440q80"
    ],
    "uploadDate": "2024-03-27T09:02:37Z"
  }
]
]</script>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the import using the supplied godt.no URL and inspect its application/ld+json metadata, especially the nested list of objects. The work is done when the cookbook imports the recipe successfully and the existing "No parser found for the given import" error no longer occurs for this page.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, json
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.