botrockets
Regular Member
- Mar 16, 2013
- 389
- 647
This bing wallpaper download, downloads last 2 weeks wallpapers on bing.com
I created this tool for my own purpose... I really like bing wallpapers.
https://www.mediafire.com/file/mydbngldj1uygb1/Bing Wallpaper downloader.rar
https://www.virustotal.com/#/file/8...34be201953200e831105d0fafe97b713464/detection
Coded with 10 lines of code of F# !
I created this tool for my own purpose... I really like bing wallpapers.
https://www.mediafire.com/file/mydbngldj1uygb1/Bing Wallpaper downloader.rar
https://www.virustotal.com/#/file/8...34be201953200e831105d0fafe97b713464/detection
Coded with 10 lines of code of F# !
Code:
let DownloadAllWallpapers fmt =
let ImgUrl u= sprintf "http://www.bing.com%s" u
let SaveFile (url:string) (bytes:byte array)= File.WriteAllBytes("Downloads/" + Path.GetFileName(url),bytes)
Directory.CreateDirectory("Downloads")|>ignore
printfn "Downloading Image Urls..."
Seq.initInfinite (fun i-> i+1)
|>Seq.map (fun u-> Wallpaper.Load (BuildUrl fmt u))
|>Seq.truncate 16
|>Seq.map (fun r->r.Images)
|>Seq.concat
|>Seq.map (fun x->x.Url)
|>Seq.distinct
|>Seq.iter (fun img ->match Http.Request(ImgUrl img).Body with |Binary bytes -> SaveFile img bytes
printfn "%s" (ImgUrl img)
|_->())
printfn "Download complete"