Use simplejson first, and centralize import

simplejson is supposed to be faster:
http://stackoverflow.com/questions/712791/json-and-simplejson-module-differences-in-python
This commit is contained in:
Laurent Bachelier 2012-03-16 16:27:22 +01:00
commit b8d1a52732
7 changed files with 36 additions and 30 deletions

View file

@ -18,6 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser import BaseBrowser, BasePage
from weboob.tools.json import json
from weboob.capabilities.video import BaseVideo
from weboob.tools.browser.decorators import id2url
@ -25,11 +26,6 @@ from StringIO import StringIO
from time import time
import re
try:
import json
except ImportError:
import simplejson as json
try:
from urlparse import parse_qs
except ImportError: