Sign in to follow this  
Followers 0

Mega Tokyo Comic Ripper

3 posts in this topic

well, i had a request from a mate, to try and get them as he is on dial up.. and is a real fan. but his collection isnt up to date.

first thought was to log the man hours. and do it the hard way. then i figured, i had learnt enough to finally produce a "polished" looking script, so here is the first script i produced in auto IT to serve a specific function.. that wokred 100% flawlessly.

#cs ----------------------------------------------------------------------------

 AutoIt Version:
 Author:         tAK Telapis

 Script Function: Grab MegaTokyo Comics
    Template AutoIt script.

    Create the directory c:\MegaTokyo\ before starting this script
    im not sure if it gets auto created. and its neater if it doesnt.
    on the 4th line up from the bottom, $i is matched to a number,
    this number should be set to the number of the most current comic
    as viewable at , simple right click the
    current comic, and choose properties. the number is used as part
    of the filename.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

; ---------------------------------
; Set main variables here - directory for comics to be saved here, startubg comic number ($i), set file types
; ---------------------------------
$MTFolder = "C:\MegaTokyo\"
$i = 1
$gif = ".gif"
$jpg = ".jpg"

While 1 ; begin the loop
; ---------------------------------
; Set the file name for the comics as 000 is lost in calculations, default to .gif files
; ---------------------------------
$len = StringLen($i)
    If $len = 1 then
        $ComicName = ("000"&$i)
    ElseIf $len = 2 then
        $ComicName = ("00"&$i)
    ElseIf $len = 3 Then
        $ComicName = ("0"&$i)

; ---------------------------------
; Set the URL of the comic wanted, this keeps the InetGet function clean, check if .gif is valid, if not, change to .jpg
; ---------------------------------
$Url = ""
$URLSize = InetGetSize(""&$ComicName&$gif)
    If $URLSize = 0 then
        $ComicName = ($ComicNAme&$jpg)
        $ComicName = ($ComicName&$gif)

; ---------------------------------
; get the file, and save it to the MTFolder with the calculated ComicName
; ---------------------------------
InetGet ($url&$ComicName, $MTFolder&$ComicNAme)
; Check to see if the file exists
    If $MTFolder&$ComicName = -1 then
        MsgBox(16, "Error", "Failed to get comic # "&$ComicName)
; Check to see that the file has size
$Size = FileGetSize($MTFolder&$ComicName)
    If $Size <= 1 then
        MsgBox(16, "File size is null for", $MTFolder&$ComicName" File size was "&$size)
; increase the comic number by 1 to get the next comic
$i = $i + 1
If $i == 887 Then
    MsgBox(0, "End of Comics", "there are only 886 comics at the time of this script, happy reading")


Share this post

Link to post
Share on other sites

#2 ·  Posted (edited)

Very Cool Script and easy to modify for other web comics.

Thanks! :P

Edited by Jmoo

Share this post

Link to post
Share on other sites

glad someone found it useful.

i have one for User Friendly aswell.. but its a complete mess beyond all belief.. i gave up when i got to around 2000 comics and noticed that they had changed there source code.. there comics are named oddly, and not in an easy to grab server side storage.

so, if anyone happens to have all of the userfriendly comics, id be very interested in them.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0