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

Unable to get meta tag value from inside body #211

Open
samibelal0 opened this issue Nov 2, 2023 · 0 comments
Open

Unable to get meta tag value from inside body #211

samibelal0 opened this issue Nov 2, 2023 · 0 comments

Comments

@samibelal0
Copy link

samibelal0 commented Nov 2, 2023

Given a HTML structure...

<html>
  <head>
....
  </head>
  <body>
    <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer" >
      <div>
        <span>A$140</span>
        <span>A$199</span>
      </div>
      <div>
        You save: A$59 (30% Off)
      </div>
      <meta itemprop="price" content="140">
      <meta itemprop="priceCurrency" content="AUD">
    </div> 
  </body>
</html>

I'm unable to extract these two meta tags from body of the html.

This is what I'm trying
meta_data = extruct.extract(html=<page_html>, base_url=<page_url>, syntaxes=['microdata', 'opengraph', 'rdfa', 'json-ld'])

Am I missing something? or does extruct doesn't support meta tag extraction from html?

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

No branches or pull requests

1 participant