-
Notifications
You must be signed in to change notification settings - Fork 42
/
eBooks - GetYear.au3
47 lines (42 loc) · 1.42 KB
/
eBooks - GetYear.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#cs
Author: Bennet van der Gryp
Description:
#ce
#include <File.au3>
#include <Array.au3>
#include <String.au3>
#include <Inet.au3>
#include <Excel.au3>
Dim $FileListFixed
$Path = "C:\Users\Bennet van der Gryp\eBooks\mobi"
$FileList = _FileListToArray($Path)
$oExcel = _ExcelBookNew()
$Row = 1
For $FileName In $FileList
If Not IsNumber($FileName) Then
$FileName = StringLeft($FileName, StringLen($FileName) - 5)
$URL1 = "http://www.amazon.com/gp/aw/s/ref=is_box_?k="
$URL2 = $FileName
$URL3 = "&x=0&y=0"
$URL = $URL1 & $URL2 & $URL3
$SrcCode = _INetGetSource($URL)
$PATH = _StringBetween($SrcCode, '<a href="/gp/aw/d/', '">')
$PATH[0] = StringReplace($PATH[0], "mp_s_a_1","aw_d_detail")
$PATH[0] = StringReplace($PATH[0], "?","?pd=1&")
;~ MsgBox(0,"SRC", $PATH[0])
$URL = "http://www.amazon.com/gp/aw/d/" & $PATH[0]
;~ ConsoleWrite($URL)
$SrcCode = _INetGetSource($URL)
$ReleaseDate = _StringBetween($SrcCode, 'Release date: ', '<br />')
ConsoleWrite($ReleaseDate[0] & " : ")
ConsoleWrite($FileName & @CRLF)
;~ ConsoleWrite($SrcCode)
;~ ConsoleWrite(_INetGetSource('http://www.autoitscript.com'))
;~ Exit
_ExcelWriteCell($oExcel, $ReleaseDate[0], $Row, 1)
_ExcelWriteCell($oExcel, $FileName, $Row, 2)
$Row += 1
EndIf
Next
;~ http://www.amazon.com/gp/aw/d/1406862894/ref=aw_d_detail?pd=1&qid=1315474818&sr=8-1
;~ http://www.amazon.com/gp/aw/d/1406862894/ref=mp_s_a_1?qid=1315474818&sr=8-1