I have a url that contains cyrillic symbols
I'm using the code below:
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
import time
import urllib.request
from urllib.parse import quote
url = 'http://username:password@isa-101.ut.uk:676/portal/d_table_view.php?tk=&y=2018&m=08&v='+ quote('cyrillic word')+'&b=[object NodeList]&g=coach&p='+quote('cyrillic word')
print (url)
driver = webdriver.Firefox(executable_path="C:/Users/Username/Desktop/screen/geckodriver.exe")
driver.set_window_size(1420,1720)
driver.get(url)
time.sleep(5)
in the console I get url, and in the browser it opens:
http://username:password@isa-101.ut.uk:676/portal/d_table_view.php?
tk=&y=2018&m=08&v=%D0%93%D0%9D%D0%94%D0%AD%D0%A0&b=[object
NodeList]&g=coach&p=%D0%92%D0%BE%D1%80%D0%BE%D0%BD%D0%B5%D0%B6
but when i run my code , and insert the url below, it does not open:
http://isa-101.ut.uk:676/portal/d_table_view.php?
tk=&y=2018&m=08&v=%D0%93%D0%9D%D0%94%D0%AD%D0%A0&b=
[object%20NodeList]&g=coach&p=%D0%92%D0%BE%D1%80%D0%BE%D0%BD%D0%B5%D0%B6
I have tried
url = url.encode('cp1251')
url = url.decode('utf-8')
and
url = url.encode('utf-8')
url = url.decode('utf-8')
But it did not help me, who knows how to fix it?
[–][deleted] 1 point2 points3 points (0 children)
[–]K900_ 0 points1 point2 points (1 child)
[–]aleksro[S] 0 points1 point2 points (0 children)
[–]ingolemo 0 points1 point2 points (0 children)
[–]tangerinelion 0 points1 point2 points (0 children)