Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maangchi: aggregate rating data is not retrieved because it has moved into a referenced entity #908

Closed
2 tasks done
jayaddison opened this issue Oct 19, 2023 · 0 comments · Fixed by #913
Closed
2 tasks done
Labels

Comments

@jayaddison
Copy link
Collaborator

Pre-filing checks

  • I have searched for open issues that report the same problem
  • I have checked that the bug affects the latest version of the library

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

Discovered during review of #905.

The results you expect to see

The overall rating of 5 from the referenced AggregateRating in the page HTML should be returned:

        {
            "@id": "/recipe/yuringi#sso/recipe/95471/rating-aggregate/5/233/1/5",
            "@context": "https://schema.org",
            "@type": "AggregateRating",
            "ratingValue": 5,
            "ratingCount": 233,
            "worstRating": 1,
            "bestRating": 5
        },

...

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

>>> s.ratings()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../recipe-scrapers/recipe_scrapers/plugins/exception_handling.py", line 64, in decorated_method_wrapper
    return decorated(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../recipe-scrapers/recipe_scrapers/plugins/schemaorg_fill.py", line 48, in decorated_method_wrapper
    return decorated(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../recipe-scrapers/recipe_scrapers/maangchi.py", line 46, in ratings
    return self.schema.ratings()
           ^^^^^^^^^^^^^^^^^^^^^
  File ".../recipe-scrapers/recipe_scrapers/_schemaorg.py", line 258, in ratings
    raise SchemaOrgException("No ratingValue in SchemaOrg.")
recipe_scrapers._exceptions.SchemaOrgException: recipe-scrapers exception: No ratingValue in SchemaOrg.

This looks like a case where entity-based lookups may be required, similar to #895.

cc @jknndy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant