Try this
import httpClient
import xmltree
import htmlparser
import strtabs
var client = newHttpClient()
var url = "https://www.instagram.com/p/B1oqkXKFlcD"
var htmlsrc = client.getContent(url)
let xml = parseHtml(htmlsrc)
for meta in xml.findAll("meta"):
if meta.attrs.hasKey("property") and meta.attrs["property"] ==
"og:image":
echo "URL: ", meta.attrs["content"]
Run
- How to use extract string with contains a certain pattern? anta40
- Re: How to use extract string with contains a certain patt... SolitudeSF
- Re: How to use extract string with contains a certain ... anta40
- Re: How to use extract string with contains a cert... filip
