extruct icon indicating copy to clipboard operation
extruct copied to clipboard

Unable to get meta tag value from inside body

Open samibelal0 opened this issue 2 years ago • 0 comments

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?

samibelal0 avatar Nov 02 '23 03:11 samibelal0