diff --git a/opengraph/opengraph.py b/opengraph/opengraph.py index 9cedb97..24a687e 100644 --- a/opengraph/opengraph.py +++ b/opengraph/opengraph.py @@ -55,7 +55,7 @@ def parser(self, html): """ """ if not isinstance(html,BeautifulSoup): - doc = BeautifulSoup(html) + doc = BeautifulSoup(html, 'html.parser') else: doc = html ogs = doc.html.head.findAll(property=re.compile(r'^og')) @@ -123,4 +123,4 @@ def scrape_url(self, doc): def scrape_description(self, doc): tag = doc.html.head.findAll('meta', attrs={"name":"description"}) result = "".join([t['content'] for t in tag]) - return result \ No newline at end of file + return result