What do you want to save?
Add Code snippet
New code examples
-
C# 2021-10-18 01:51:04
c# web scraping get images from specific url
static void browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { WebBrowser browser = (WebBrowser)sender; HtmlElementCollection collection; List<HtmlElement> imgListString = new List<HtmlElement>(); ... Add solution -
Javascript 2021-10-18 01:24:08
json array in hidden field not coming
> encodeURIComponent(JSON.stringify({"name":"John"})) > "%7B%22name%22%3A%22John%22%7D" > var data = JSON.parse(decodeURIComponent(div.getAttribute("data-json"))) > console.log(data) > Object {name... Add solution -
PHP 2021-10-16 18:18:03
php get site metat tags
function getSiteOG( $url, $specificTags=0 ){ $doc = new DOMDocument(); @$doc->loadHTML(file_get_contents($url)); $res['title'] = $doc->getElementsByTagName('title')->item(0)->nodeValue; foreach ($doc->getElementsByTagName('meta') a... Add solution -
Other 2021-10-12 00:35:04
background image load defer
function init() { var imgDefer = document.querySelectorAll('div[data-src]'); var style = "background-image: url({url})"; for (var i = 0; i < imgDefer.length; i++) { imgDefer[i].setAttribute('style', style.replace("{url}",... Add solution -
Javascript 2021-10-09 13:46:04
get all links from html javascript
var rawHTML = '<html><body><a href="foo">bar</a><a href="narf">zort</a></body></html>'; var doc = document.createElement("html"); doc.innerHTML = rawHTML; var links = doc.getEl... Add solution -
Other 2021-10-08 09:23:04
how to download images on a website puppeteer
const puppeteer = require('puppeteer'); const fs = require('fs'); async function run() { const browser = await puppeteer.launch({ headless: false }); const page = await browser.newPage(); await page.setViewport({ width: 1200, heig... Add solution -
C# 2021-10-06 16:56:06
get attribute value of xml element c#
string name; XmlDocument xml = new XmlDocument(); xml.Load("theFile.xml"); // Or any other method to load your xml data in the XmlDocument. // For example if your xml data are in a string, use the LoadXml method. XmlElement elt = xml.SelectSing... Add solution