简体   繁体   English

基于变量名称的可自定义 URL 链接

[英]Customizable URL links based on a variable name

I have a url link that I generate from each run of a code.我有一个从每次运行代码生成的 url 链接。 The url link is stored in a variable and it is then called by a href.... (with the braces before) I am using cgi in python, if it helps Each time I input a UniPROT ID, I generate a string based url url 链接存储在一个变量中,然后由 href 调用....(前面有大括号)我在 python 中使用 cgi,如果它有帮助每次我输入一个 UniPROT ID,我生成一个基于字符串的 url

I want that url to be general each time I run.我希望每次运行时该 url 都是通用的。 How do I do it?我该怎么做?

Image (Im unable to add image in the post, here the site is forcing me to use a url for this)图片(我无法在帖子中添加图片,这里网站强迫我为此使用网址)

Each time I input a UniPROT ID, I generate a string based url每次我输入一个 UniPROT ID,我都会生成一个基于字符串的 url

I want that url's hyperlink to be general each time I run.我希望每次运行时该 url 的超链接都是通用的。 How do I do it?我该怎么做?

The file name generate strategy should be changed to something related to image data.文件名生成策略应更改为与图像数据相关的内容。

Try using md5 of the image as the file name or some hash function.尝试使用图像的 md5 作为文件名或一些哈希函数。

Thus each time you get the same link no matter how many times you run the code.因此,无论您运行代码多少次,每次您都获得相同的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM