import json from multiprocessing.pool import Pool from requests.exceptions import RequestException import urllib.request def get_page(url): try: req = urllib.request.Request(url) headers = {'User-agent': 'FireFox/12.0'} response = urllib.request.urlopen(req) html = response.read().decode('utf-8') if html != None: return html