Skip to content

Instantly share code, notes, and snippets.

@PrateekKumarSingh
Last active May 6, 2019 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save PrateekKumarSingh/61806229dda564694317 to your computer and use it in GitHub Desktop.
Save PrateekKumarSingh/61806229dda564694317 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