this #image is hosted on #nostr #hostr
any possible legal issues from this technique however will come to this hosting domain unfortunately
Reply to this note
Please Login to reply.
this #image is hosted on #nostr #hostr
any possible legal issues from this technique however will come to this hosting domain unfortunately
Please Login to reply.
this will retrieve same image without middleman webserver
firefox $(echo '["REQ","q", {"ids": ["81d2e5a2917dc6d9b028e26fb57cb23fd04cca91fcf6432b17b9df33084a78ed"]}]' | websocat wss://relay.nostr.band | head -n 1 | jq -r .[2].content | htmlq 'meta[property="og:image"]' -a content)
this retrieves the same image with js
```js
socket = new WebSocket("wss://relay.nostr.band")
socket.onopen = function(){
this.send('["REQ","q1",{"ids":["81d2e5a2917dc6d9b028e26fb57cb23fd04cca91fcf6432b17b9df33084a78ed"]}]')
}
socket.onmessage = function(msg){
try{
data=JSON.parse(msg.data)
if(data[2]){
div = document.createElement("div")
div.innerHTML = data[2].content
image = div.querySelector('meta[property="og:image"]').content
console.log("image", image)
}
}catch(e){}
}
```