import urllib2 to query.py