diff --git a/opengraph/opengraph.py b/opengraph/opengraph.py index 2fa1356..0d7689e 100644 --- a/opengraph/opengraph.py +++ b/opengraph/opengraph.py @@ -7,13 +7,6 @@ except ImportError: from BeautifulSoup import BeautifulSoup -global import_json -try: - import json - import_json = True -except ImportError: - import_json = False - class OpenGraph(dict): """ """ @@ -85,20 +78,6 @@ def to_html(self): meta += u"\n" return meta - - def to_json(self): - # TODO: force unicode - global import_json - if not import_json: - return "{'error':'there isn't json module'}" - - if not self.is_valid(): - return json.dumps({'error':'og metadata is not valid'}) - - return json.dumps(self) - - def to_xml(self): - pass def scrape_image(self, doc): images = [dict(img.attrs)['src']