forked from Pahiro/AutoIT-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
DeviantART Downloader.au3
63 lines (59 loc) · 1.67 KB
/
DeviantART Downloader.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <String.au3>
#include <array.au3>
#include <Inet.au3>
#cs
Author: Bennet van der Gryp
Description: This program downloads all pictures from DeviantART based on a search string.
#ce
$Count = 0
$end = 10
$folder = "skirt"
;~ $folder = "weddings"
While 1
ConsoleWrite(@CRLF & "Page " & $Count & " - ")
$Count += 1
$URL = "http://browse.deviantart.com/photography/people/?q=" & $folder & "&order=9" & "&offset=" & 24 * $Count
;~ $URL = "http://browse.deviantart.com/photography/people/" & $folder & "/?order=9" & "&offset=" & 24 * $Count
$Source = _INetGetSource($URL)
$image = _StringBetween($Source,'<img width=', '"></a></span>')
For $record in $image
$pos = StringInStr($record, "http")
$record = StringMid($record, $pos)
$record = StringReplace($record, "/150/", "/",1)
$record = StringReplace($record, "th", "fc",1)
$number = StringMid($record, 10,2)
$filename = StringMid($record, 48)
If Not FileExists("C:\TEMP\DeviantART\" & $folder & "\" & $filename) Then
;~ InetGet($record, "C:\TEMP\DeviantART\" & $folder & "\" & $filename)
$img = InetRead($record)
ConsoleWrite(@error & " ")
If @error <> 0 Then
ConsoleWrite($record & @crlf)
Else
$File = FileOpen("C:\TEMP\DeviantART\" & $folder & "\" & $filename,2+16+8)
FileWrite($File,$img)
FileClose($File)
EndIf
Else
ConsoleWrite("2 ")
EndIf
Next
If $Count >= $end Then
Exit
EndIf
WEnd
;~ # Artistic Nude
;~ # Body Art
;~ # Classic Portraits
;~ # Cosplay
;~ # Emotive Portraits
;~ # Expressive
;~ # Fashion Portraits
;~ # Fetish Portraits
;~ # Glamour Portraits
;~ # Infants and Children
;~ # Miscellaneous
;~ # Pin-up
;~ # Self-Portraits
;~ # Spontaneous Portraits
;~ # Weddings