Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Usage
... """
>>> movie = opengraph.OpenGraph() # or you can instantiate as follows: opengraph.OpenGraph(html=HTML)
>>> movie.parser(HTML)
>>> video.is_valid()
>>> movie.is_valid()
True

**Generate JSON or HTML**
Expand Down
2 changes: 1 addition & 1 deletion opengraph/opengraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class OpenGraph(dict):
"""
"""

required_attrs = ['title', 'type', 'image', 'url', 'description']
required_attrs = ['title', 'type', 'image', 'url']

def __init__(self, url=None, html=None, scrape=False, **kwargs):
# If scrape == True, then will try to fetch missing attribtues
Expand Down
1 change: 1 addition & 0 deletions opengraph/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_isinstace(self):
def test_to_html(self):
og = opengraph.OpenGraph(html=HTML)
self.assertTrue(og.to_html())
self.assertTrue(og.is_valid())

def test_to_json(self):
og = opengraph.OpenGraph(url='https://www.youtube.com/watch?v=XAyNT2bTFuI')
Expand Down