How to get the id parameters in the url of the current web page by python

Novice, first contact with python, server environment: window 2008server+IIS+python 2.7.8

as mentioned in the question, how does python get the id parameters in the url of the current web page?

for example, the current URL is: www.abc.com/index.py?id=123456

how to get this id value, 123456

must be written in python.

Jun.24,2021

import urlparse
urldata = "http://en.wikipedia.org/w/api.php?action=query&ctitle=FA"
result = urlparse.urlparse(urldata)
print result
print urlparse.parse_qs(result.query)

< H2 > get < / H2 > in a regular way
import re
 
pattern = re.compile(r'id=(\d+)')   -sharp 
result1 = pattern.findall('www.abc.com/index.py?id=123456')
 
print(result1)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ab7e-2c21f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ab7e-2c21f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?