summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTrupti Rajesh Kini2016-10-24 15:00:37 +0530
committerGitHub2016-10-24 15:00:37 +0530
commit27d47a26dd9c7765bbfda112eddbebe8f3679460 (patch)
tree4c26ad501f9387e3d16c389603ae1432bd2c64fd /scripts
parentc5c3c7b6c4794d960ead6137d251cd9b8f423aa4 (diff)
parenteb3321f80def84e84329f213e21ef5ac94d4ccd6 (diff)
downloadPython-TBC-Interface-27d47a26dd9c7765bbfda112eddbebe8f3679460.tar.gz
Python-TBC-Interface-27d47a26dd9c7765bbfda112eddbebe8f3679460.tar.bz2
Python-TBC-Interface-27d47a26dd9c7765bbfda112eddbebe8f3679460.zip
Merge pull request #2 from kinitrupti/upgrade-django-1.9
Upgrade django 1.9
Diffstat (limited to 'scripts')
-rw-r--r--scripts/crawler/tbc_web_crawler/spiders/tbc_spider.py2
-rw-r--r--scripts/database_updater.py4
-rw-r--r--scripts/split_json.py8
3 files changed, 7 insertions, 7 deletions
diff --git a/scripts/crawler/tbc_web_crawler/spiders/tbc_spider.py b/scripts/crawler/tbc_web_crawler/spiders/tbc_spider.py
index 9688e70..befc63f 100644
--- a/scripts/crawler/tbc_web_crawler/spiders/tbc_spider.py
+++ b/scripts/crawler/tbc_web_crawler/spiders/tbc_spider.py
@@ -1,5 +1,5 @@
import scrapy
-from items import TbcErrorItems, TbcBrokenItems
+from .items import TbcErrorItems, TbcBrokenItems
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from scrapy.http import Request
diff --git a/scripts/database_updater.py b/scripts/database_updater.py
index 71813ea..6bbb1f6 100644
--- a/scripts/database_updater.py
+++ b/scripts/database_updater.py
@@ -74,5 +74,5 @@ if __name__ == '__main__':
b = a.fetch_comments_from_script()
c = a.add_comments_to_db() #This should always be before delete_redundant_comments
d = a.delete_redundant_comments() #This should always be after add_comments_to_db
- print c
- print d
+ print (c)
+ print (d)
diff --git a/scripts/split_json.py b/scripts/split_json.py
index baa0b90..a6905db 100644
--- a/scripts/split_json.py
+++ b/scripts/split_json.py
@@ -1,4 +1,4 @@
-import cPickle
+import pickle
import json
from os.path import dirname, abspath,join
try:
@@ -7,14 +7,14 @@ try:
json_dump.close()
a = [saved_data for saved_data in json_data if str(saved_data).startswith("{u'ch")]
with open(join(dirname(abspath(dirname(__file__))),'tbc_error_page/error.pickle'), "w+") as error_json:
- cPickle.dump(a, error_json)
+ pickle.dump(a, error_json)
error_json.close()
b = [saved_data for saved_data in json_data if str(saved_data).startswith("{u'br")]
with open(join(dirname(abspath(dirname(__file__))),'tbc_error_page/broken.pickle'), "w+") as broken_json:
- cPickle.dump(b, broken_json)
+ pickle.dump(b, broken_json)
broken_json.close()
except ValueError:
- print "Couldn't find file"
+ print("Couldn't find file")