jeudi 21 décembre 2017

Rails: How to read a list of images from a URL

I have a URL like below->

images = open("example.com").read

which returns

<center>
<font size=-1>
<img src=http://ift.tt/2pacr2i image<p>
<img src=http://ift.tt/2DkZbKZ image<p>
<img src=http://ift.tt/2pbsflp image<p>
</font>

I want to capture each of these on backend and send them to the front end. So far I was sending the resulting html directly to front end where it was displayed. But now I want to capture it on backend and then send each one to UI. How can I do this?

Aucun commentaire:

Enregistrer un commentaire