0
Hyperlink in Python
How can a string be converted in Hyperlink, i.e., if I hover mouse over it, so it displays a link and on clicking that, it goes to that link............. s = "My Page" on hovering s it displays a link https:www.mypage.com/mypage and on clicking, it opens this page
5 Answers
+ 1
Gaurav More solution is required for hyperlinking in python not in html.....
+ 1
from hyperlink import URL url = URL.from_text(u'url_here')
utm_source = url.get(u'utm_source') better_url = url.replace(scheme=u'https', port=443) org_url = better_url.click(u'.')
0
<a href="url">link text</a>
At the url place insert your page location with its name eg. Main.html replacing url.
0
You have to import hyperlink package in the code
0
Gaurav More your oppinion is correct but that doesn't work for what I have asked for
The link generated in variable better_url will not be attached to the string "My Page" it is written seperately to use but I want to attach the url with the string and not to write it seperately