Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ids := ["B000C1Z3J0", "B000OUTTP8"]
- ua := "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"
- http := WinHttpRequest({"UA":ua})
- for _,articleId in ids {
- html := http.GET("https://www.amazon.co.uk/dp/" articleId)
- document := ComObjCreate("HTMLFile")
- document.Write(html)
- title := document.getElementById("productTitle").outerText
- overview := document.getElementById("productOverview_feature_div").outerText
- image := document.getElementById("landingImage").src
- desc := ""
- loop Parse, % overview, `n, % "`r "
- desc .= A_LoopField (Mod(A_Index, 2) ? ": " : "`n")
- UrlDownloadToFile % image, % A_Temp "\image"
- Gui Test_:New, +LastFound
- Gui Font, w800
- Gui Add, Text,, Title:
- Gui Font, w400
- Gui Add, Edit,, % title
- Gui Font, w800
- Gui Add, Text,, Description:
- Gui Font, w400
- Gui Add, Edit,, % desc
- Gui Add, Picture, w200 h400, % A_Temp "\image"
- Gui Show
- WinWaitClose
- }
- Test_GuiClose:
- Test_GuiEscape:
- Gui Destroy
- return
- ; https://git.io/JnMcX
- #Include WinHttpRequest.ahk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement