Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save johndonnelly/163d3dd19c1f3d5da02cdbf1b5626a15 to your computer and use it in GitHub Desktop.
Save johndonnelly/163d3dd19c1f3d5da02cdbf1b5626a15 to your computer and use it in GitHub Desktop.
Extracting Images from a URL and saving it in a desired directory
$url="https://geekeefy.wordpress.com/2016/03/12/powershell-extract-text-from-image-and-convert-print-in-any-language/"
(Invoke-WebRequest -Uri $url).images.src | ?{$_ -like "*Geekeefy.files*"} -PipelineVariable pv `
| %{$fn = ($pv.split("/")[-1]).split('?')[0];iwr $pv -OutFile "D:\scraping\$fn"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment