且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何链接图像。

更新时间:2023-02-26 13:22:47

为什么你不能只需创建从源网站到目标网站的链接?如果他们更改了图像(并且其名称保持不变),那么它也只是简单地更新你的图像。



如果他们更新并且更改名称 - 然后你在黑暗中拍摄。如果你可以抓住他们的页面和屏幕抓取图像,那么你可以用他们的更新你的价值观。你需要一些方法来区分图像。如果在 DOM 中,并且页面上没有任何内容更改位置,那么您可以通过这种方式获取列表(迭代所有< img>实体的数组。如果他们有ID,那么生活会更容易(除非这些改变也是如此。



如果遥控器不在您的控制范围内 - 您只能希望。如果它在您的控制范围内,那么您可以提前得到答案。


Why can you not simply create the link from the source website to the target website? If they change the image (and its name remains the same) then it will just simply update yours, too.

If they update and change the name - then you're shooting in the dark. If you can grab their page and screen-scrape for the images then you can update your values with theirs. You'll need some way to tell the images apart. If in DOM, and nothing on the page changes location, then you can get the list that way (iterating the array of all <img> entities. If they had ID's then life would be easier (unless those change, too).

If the remote is out of your control - you can only hope. If it's in your control, then you have the answers in advance.