Skip to content

Instantly share code, notes, and snippets.

@priyankajayaswal1
Created March 13, 2015 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priyankajayaswal1/a95f575281d85118f83c to your computer and use it in GitHub Desktop.
Save priyankajayaswal1/a95f575281d85118f83c to your computer and use it in GitHub Desktop.
if sys.version_info[0] > 2:
from urllib.parse import urlparse, urljoin
from urllib.error import HTTPError
import urllib.request as urllib2
from html.parser import HTMLParser
raw_input = input
else:
from urlparse import urlparse, urljoin
import urllib2
from urllib2 import HTTPError
from HTMLParser import HTMLParser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment