I'm working on a simple Instagram image downloader on Nim.
Example is this image:
[https://www.instagram.com/p/B1oqkXKFlcD](https://www.instagram.com/p/B1oqkXKFlcD)
My idea is 1st get the HTML code of that link, like this:
import httpClient
var client = newHttpClient()
var src = "https://www.instagram.com/p/B1oqkXKFlcD"
var htmlsrc = client.getContent(src)
echo htmlsrc
Run
That works fine. You'll get lots of HTML lines. The actual image itself can be
found with the **og:image** tag:
<meta property="og:image"
content="https://instagram.fcgk23-1.fna.fbcdn.net/vp/e7663a7f70afcedf1d66424a310bba19/5E13D4FF/t51.2885-15/e35/p1080x1080/67664270_675154659649319_4991162461801475991_n.jpg?_nc_ht=instagram.fcgk23-1.fna.fbcdn.net&_nc_cat=111"
/>
Run
Now, how can I extract the link:
[https://instagram.fcgk23-1.fna.fbcdn.net/vp/e7663a.....](https://instagram.fcgk23-1.fna.fbcdn.net/vp/e7663a.....)
? Once I do that, then I can pass it to a image downloading function.