Help with Url replace

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pinoytracker Offline
Junior Member
Posts: 13
Joined: Apr 2017
Reputation: 0
Post: #1
Hi can someone help me to change the value of URL

from this :

http://www.website.yyy/2017/04/String-to- get-april-21-2017.html

to this :

http://www.website.yyy/search/label/String%20to%20get

thanks highly appreciated
(This post was last modified: 2017-04-21 19:42 by pinoytracker.)
find quote
Lunatixz Offline
Skilled Python Coder
Posts: 4,941
Joined: May 2011
Reputation: 148
Location: NYC
Post: #2
You need to format the string to a url format:
https://docs.python.org/2/library/urllib...llib.quote
https://www.w3schools.com/tags/ref_urlencode.asp
find quote