extruct icon indicating copy to clipboard operation
extruct copied to clipboard

Added twitter card functionality

Open blackhat-7 opened this issue 3 years ago • 2 comments

I have added the twitter card functionality. So now it extracts namespaces and properties of the twitter cards. I have also added 3 test cases

This was a needed feature in issue #179

For example the following now works:

>>> extruct.extract('<!doctype html><html><head><meta name="twitter:card" content="summary">')
{'microdata': [], 
'json-ld': [], 
'opengraph': [], 
'microformat': [], 
'rdfa': [],
 'dublincore': [{'namespaces': {}, 'elements': [], 'terms': []}], 
'twittercard': [{'namespace': {'twitter': 'https://dev.twitter.com/cards#'}, 'properties': [('twitter:card', 'summary')]}]}

blackhat-7 avatar May 13 '22 15:05 blackhat-7

Would love to see this get in the next version tag! @blackhat-7, you might want to update the REAME to mention twitter card usage.

stephentgrammer avatar May 13 '22 16:05 stephentgrammer