diff --git a/crawler/calibre.py b/crawler/calibre.py index b741d4d..d0e362a 100644 --- a/crawler/calibre.py +++ b/crawler/calibre.py @@ -1,8 +1,13 @@ #!/usr/bin/python -import os, time, sys, json, urllib, urllib2, threading, re +import os, time, sys, urllib, urllib2, threading, re from collections import deque from BeautifulSoup import BeautifulSoup +try: + import json +except: + import simplejson as json + STOP = False pipe_name = 'pipe_books' diff --git a/crawler/daemon.py b/crawler/daemon.py index a345603..21dc553 100644 --- a/crawler/daemon.py +++ b/crawler/daemon.py @@ -1,5 +1,10 @@ #!/usr/bin/python -import os, time, sys, json, _mysql +import os, time, sys, _mysql + +try: + import json +except: + import simplejson as json def stringdammit(input_string): if isinstance(input_string, str):