Home  >  Q&A  >  body text

python3文本中超链接处理问题求助

有一个超链接地址,如何把它写到文本里并重新命名,结果是文本文件里呈现命名的名字,点击名字可以搜索这个超链接,如何实现呢

大家讲道理大家讲道理2741 days ago754

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:28:27

    Do you want to write a lot of links? If there is less, just write it directly in word or excel, then click on the hyperlink and write the name you want to write where the name is displayed. If you want to do it in Python, as far as I know there is no such function. Python needs to install libraries to operate word and excel.

    reply
    0
  • 阿神

    阿神2017-04-18 10:28:27

    Write an html

    <body>
    <a href ="http://a.a.com">链接</a>
    </body>

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 10:28:27

    As far as I know, the file formats that support hyperlink clicks are word, excel, pdf, epub, mobi, maketown, etc., so you must first determine what format the file you want is. Then find the corresponding library to implement it. Ordinary txt text does not support hyperlinks unless you use makedown syntax [网址之家](http://www.hao123.com),
    Website Home
    and then implement it in the mk editor.

    reply
    0
  • Cancelreply