I’m working on a crawler. Usually, when i type url1 in my browser, browser converts it to url2.
How can i do this in Python?
url1: http://www.odevsitesi.com/ara.asp?kelime=doğanın dengesinin bozulması
url2: http://www.odevsitesi.com/ara.asp?kelime=do%F0an%FDn%20dengesinin%20bozulmas%FD
You need to properly encode the URL (iso-8859-9 in your case), separate it into parts, urllib.quote the query part, and put it together again. I.e.: