Commits

Jason R. Coombs committed e75c49e

Rely on six for urllib.parse.quote_plus

  • Participants
  • Parent commits 17505e3

Comments (0)

Files changed (1)

 import random
 import re
 import warnings
-try:
-	import urllib.parse as urllib_quote
-	import urllib.request as urllib_request
-except ImportError:
-	import urllib as urllib_quote
-	import urllib2 as urllib_request
 
 import six
 import requests
 def urbanlookup(word):
 	'''Gets a Urban Dictionary summary for a word.
 	'''
-	word = urllib_quote.quote_plus(word)
+	word = six.moves.urllib.parse.quote_plus(word)
 	html = get_html('http://urbandictionary.com/define.php?term=%s' % word)
 	match = urbd_exp.search(html)
 	if not match: