query = urlparse(self.path).query
query_components = dict(qc.split('=') for qc in query.split('&'))
imsi = query_components['imsi']
from urllib.parse import urlparse, parse_qs
query_components = parse_qs(urlparse(self.path).query)
imsi = query_components['imsi']
Processing HTTP GET input parameter on server side in python