Skip to content

Commit e12b2b2

Browse files
committed
Add "product" namespace support
This is not a standard namespace (not mentioned in https://ogp.me/), but it's quite common in the wild, e.g. in a product page dataset where OG is present on ~35% of pages, this "product" namespace is present on 3.4% of pages, or ~10% of OG pages, and can often contain new information.
1 parent df7ca6b commit e12b2b2

File tree

5 files changed

+21838
-43
lines changed

5 files changed

+21838
-43
lines changed

extruct/opengraph.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
'article': 'http://ogp.me/ns/article#',
1212
'book': 'http://ogp.me/ns/book#',
1313
'profile': 'http://ogp.me/ns/profile#',
14+
# non-standard but seen in the wild
15+
'product': 'http://ogp.me/ns/product#', # ~10% of product pages with OG
1416
}
1517

1618

tests/samples/misc/opengrapg_test.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)