Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using beautifulsoup4 if available

  • Loading branch information...
commit 894d1755bd77a26983dd6b1a5bdb0fc0c5b2a391 1 parent b1a0b5a
fabian authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 opengraph/opengraph.py
View
5 opengraph/opengraph.py
@@ -2,7 +2,10 @@
import re
import urllib2
-from BeautifulSoup import BeautifulSoup
+try:
+ from bs4 import BeautifulSoup
+except ImportError:
+ from BeautifulSoup import BeautifulSoup
global import_json
try:
Please sign in to comment.
Something went wrong with that request. Please try again.