我想从
https://exemple.com/key-system-1?hwid=07f8f20b7419f622&zone=Europe/Rome
中截取我的网址
到hwid=07f8f20b7419f622
。
我试过了
url = "https://exemple.com/key-system-1?hwid=07f8f20b7419f622&zone=Europe/Rome"
uirl = url[: url.find("hwid")]
print (uirl)
但是结果是
https://exemple.com/key-system-1?
url = "https://exemple.com/key-system-1?hwid=07f8f20b7419f622&zone=Europe/Rome"
url_slice_1 = url[url.find("hwid"):]
url_slice_2 = url_slice_1[url_slice_1.find("&"):]
print (url_slice_2 )