How Python3 parses url
This article will explain in detail how Python3 parses url. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Parsing url by 1.Python3
Sample code:
#! / usr/bin/python
From urllib.parse import urlparse
Result = urlparse ('https://mbd.baidu.com/newspage/data/landingsuper?context=%7B%22nid%22%3A%22news_1732005 × × × 513653986% 22% 7Droomnroomtypewriter 0cm from1')
Print (result)
Print (result [0])
Print (result.path)
Example screenshot:
Run the screenshot:
This is the end of the article on "how Python3 parses url". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.