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
Post a Comment