powershell - Invoke-webrequest image size -


the script below loops through each url , invokes web request , downloads images it. problem facing images default getting downloaded in 320x240; on actual site image when opened in new tab , right click downloaded, gives me 960x720 pix file, after.

here script.

$url = get-content “urls.txt” $j = $url.count ($i= 0 ; $i -le $j ; $i++) { $webresponse = invoke-webrequest -uri $url[$i] foreach ($image in $webresponse.images) { $filename = split-path $image.src -leaf $d =  invoke-webrequest $image.src } } 

here links couple of them: http://csharp-video-tutorials.blogspot.com/2013/08/part-1-introduction-to-html; http://csharp-video-tutorials.blogspot.com/2013/08/part-2-reading-writing-to-console.html

compare $image.src mentionend 'new tab', these urls same?

probably need use $webresponse.links (which end *.jpg) , not $webresponse.images.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -