#1105 got fixed (metadata now matches with meta property article:*
This commit is contained in:
@@ -1456,6 +1456,12 @@ def extract_metadata_using_lxml(html, doc=None):
|
|||||||
content = tag.get("content", "").strip()
|
content = tag.get("content", "").strip()
|
||||||
if property_name and content:
|
if property_name and content:
|
||||||
metadata[property_name] = content
|
metadata[property_name] = content
|
||||||
|
# getting the article Values
|
||||||
|
metadata.update({
|
||||||
|
tag['property'].strip():tag["content"].strip()
|
||||||
|
for tag in head.find_all("meta", attrs={"property": re.compile(r"^article:")})
|
||||||
|
if tag.has_attr('property') and tag.has_attr('content')
|
||||||
|
})
|
||||||
|
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
@@ -1531,7 +1537,12 @@ def extract_metadata(html, soup=None):
|
|||||||
content = tag.get("content", "").strip()
|
content = tag.get("content", "").strip()
|
||||||
if property_name and content:
|
if property_name and content:
|
||||||
metadata[property_name] = content
|
metadata[property_name] = content
|
||||||
|
# getting the article Values
|
||||||
|
metadata.update({
|
||||||
|
tag['property'].strip():tag["content"].strip()
|
||||||
|
for tag in head.find_all("meta", attrs={"property": re.compile(r"^article:")})
|
||||||
|
if tag.has_attr('property') and tag.has_attr('content')
|
||||||
|
})
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user