DISM.exe /Online /Get-TargetEditions
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
| // Create an interval which will keep scrolling downwards | |
| const interval = setInterval(() => { | |
| window.scrollTo(0, document.body.scrollHeight) | |
| }, 250) | |
| // If there are no more items, you can call `clearInterval(interval)` to stop scrolling | |
| // Now copy the below code to scrape data and download a file containing the data | |
| ;(() => { | |
| // Define a function to scrape elements we want |
DISM.exe /Online /Get-TargetEditions
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
| public static void Scrape() | |
| { | |
| var scraper = new HtmlWeb(); | |
| var page = scraper.Load("https://vainolo.z14.web.core.windows.net/WebScraping.html"); | |
| var nodes = page.DocumentNode.Descendants().SkipWhile(e => e.Id != "Techniques").Skip(1).TakeWhile(e => e.Name != "h2"); | |
| foreach (var currNode in nodes) | |
| { | |
| if(currNode.GetClasses().Contains("mw-headline")) | |
| { |
| /** | |
| * Given some Javascript object, the function will have the browser download it as a | |
| * json file (exactly like if it was downloaded from some server). | |
| * The content of the file downloaded by the browser would be the "data" object input. | |
| * One could also pass a name for the file to be downloaded to the function. | |
| * References: | |
| * - https://www.freecodecamp.org/news/how-to-use-the-browser-console-to-scrape-and-save-data-in-a-file-with-javascript-b40f4ded87ef/ | |
| * - https://github.com/edubey/browser-console-crawl/blob/master/single-story.js | |
| * @date 2021-06-18 | |
| * @param {object} data |
| const IMAGES_NUM = 250 | |
| let imgSrcs = new Set() | |
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| function appendImages() { | |
| var imgs = document.getElementsByTagName("img") |