I have an array of links to the site where the screenshot was taken, of this type: http://prnt.sc/c0jkrl

I need to get the link that they have in body stored on the image itself http://image.prntscr.com/image/f81b70e684b64ddf8ef64e1e2334a5d6.png in general, the link can be obtained simply by clicking on "copy the link to the image" of such links I have 800 pieces. Hands do not do well.

How do I programmatically get the best? Sites never parsed, but at the level of the algorithm, everything is clear. You can leave references that look best in my case. Language - Python

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants aleksandr barakin , user194374, lexxl , Vartlok , Streletz Aug 9 '16 at 14:42 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

1 answer 1

 import requests import lxml.html url = 'http://prnt.sc/c0jkrl' r = requests.get(url) html = lxml.html.fromstring(r.text) img = html.xpath("//*[@name='twitter:image:src']/@content")[0] 

Dependencies, lxml, requests

A disadvantage, there is no error handling, if there is no image or the file is not received. Functions did not, the last 3 lines are wrapped in a function and all links are passed by them.