Python 2's urlparse.parse_qs moved to urllib.parse.parse_qs in Python
3.
import random as _random
import re as _re
import subprocess as _subprocess
-import urlparse as _urlparse
+try: # Python 3
+ import urllib.parse as _urllib_parse
+except ImportError: # Python 2
+ import urlparse as _urllib_parse
import xml.sax.saxutils as _xml_sax_saxutils
Specify either query or query_string, but not both.
"""
if query is None:
- query = _urlparse.parse_qs(query_string)
+ query = _urllib_parse.parse_qs(query_string)
page = 0
if 'pp' in query:
pp = query['pp']