Module Assign NameStore Str Assign NameStore Str Import alias Import alias Import alias Import alias ImportFrom alias Import alias Assign NameStore Call NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str Str Str Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad AttributeLoad NameLoad attr decorator_list If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Print AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num If AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body AugAssignAdd NameStore Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num If NameLoad body AugAssignAdd NameStore BinOpMult Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num Num If CompareLt NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad handlers ExceptHandler type NameLoad name NameStore body Print AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Expr Call NameLoad Num Assign NameStore ListLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad BinOpMod Str NameLoad If UnaryOpNot NameLoad body Print AttributeLoad NameLoad attr Str Expr Call NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Num FunctionDef arguments args defaults body If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Num For NameStore AttributeLoad AttributeLoad NameLoad attr attr body AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad BinOpMod Str TupleLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpDiv NameLoad NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad decorator_list While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Break If CompareLt NameLoad NameLoad body Expr Call NameLoad BinOpMod Str BinOpSub NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad Num
N/A N/A __doc__ Imageboard Image Scraper.

Example:
    $ ./imagescraper.py http://boards.4chan.org/g/thread/15898894

    This will create a g/15898894/ directory and download the images to that folder.
    You may also give links to 4chan boards as arguments.

Usage:
  imagescraper.py [-q] [-k] [-p] [-t <num>] [-o <dir>] [-l <time>] <links>...
  imagescraper.py -h | --help
  imagescraper.py --version

Arguments:
  <link>    Links to 4chan threads or boards

Options:
  -h, --help           Show this screen.
  --version            Show version.
  -q, --quiet          Do not print messages to screen
  -k, --keep-names     Keep original image names
  -p, --save-page      Save the thread html as well, to open up later
  -t, --threads <num>  Number of threads to use for multi-threading [default: 32]
  -o, --output <dir>   Where to create the directory hierarchy [default: .]
  -l, --listen <time>  Download images continuiously from given link. Accepts an
                       optional format string where you specify minutes with 'm'
                       and seconds with 's' [example: 1m30s]

Requirements:
  Python2.
 N/A _version Imageboard Image Scraper 1.0.0 N/A os N/A re N/A sys N/A time Lib.ext.docopt docopt N/A Lib N/A args N/A docopt __doc__ version _version N/A N/A N/A N/A Lib globals acquire N/A quiet keep_names save_page threads output listen links N/A args N/A --quiet N/A args N/A --keep-names N/A args N/A --save-page N/A int N/A args N/A --threads N/A args N/A --output N/A args N/A --listen N/A args N/A <links> quietly_print N/A N/A s outfile N/A N/A sys stdout N/A N/A N/A N/A N/A Lib globals quiet N/A N/A N/A N/A outfile write N/A s N/A os linesep N/A N/A N/A N/A N/A N/A os path isdir N/A N/A Lib globals output N/A N/A N/A sys stderr N/A Error: %s is not a valid directory. N/A N/A Lib globals output N/A N/A N/A N/A os chdir N/A N/A Lib globals output N/A update_interval 0 N/A N/A N/A Lib globals listen N/A N/A N/A N/A seconds N/A N/A re search (-?\d*\.?\d*)s N/A N/A Lib globals listen N/A minutes N/A N/A re search (-?\d*\.?\d*)m N/A N/A Lib globals listen N/A seconds N/A N/A update_interval N/A float N/A N/A N/A seconds groups N/A 0 N/A minutes N/A N/A update_interval N/A N/A float N/A N/A N/A minutes groups N/A 0 60 N/A N/A update_interval 0 N/A N/A N/A ValueError N/A Negative update interval %f does not make sense. update_interval N/A N/A N/A Exception N/A e N/A N/A N/A sys stderr N/A Malformed input: %s is invalid as a format string for time, recieved error: %s N/A N/A N/A Lib globals listen N/A str e N/A N/A exit 1 N/A links N/A N/A link N/A N/A Lib globals links N/A N/A N/A N/A N/A N/A links append N/A N/A N/A Lib Link classify link N/A N/A N/A Exception N/A e N/A N/A N/A quietly_print N/A Error while processing link %s, will continue if at all possible. e N/A N/A links N/A N/A N/A sys stderr No valid links, exiting with failure. N/A N/A exit 1 N/A pool N/A N/A N/A Lib Threads ThreadPool N/A N/A Lib globals threads N/A N/A N/A Lib globals downloadedFiles N/A N/A N/A N/A Lib globals links links N/A timer 0 report N/A N/A N/A N/A N/A N/A N/A Lib globals downloadedFiles N/A N/A totalBytes 0 N/A file N/A N/A Lib globals downloadedFiles N/A N/A totalBytes N/A N/A N/A os path getsize file N/A N/A quietly_print N/A Downloaded %d file(s) (%s) in %f second(s) (%s per second). N/A N/A len N/A N/A Lib globals downloadedFiles N/A N/A N/A Lib Util bytes_to_human totalBytes timer N/A N/A N/A Lib Util bytes_to_human N/A totalBytes timer N/A N/A N/A Lib globals downloadedFiles N/A N/A N/A links N/A N/A N/A N/A timer N/A N/A time time N/A link links N/A N/A N/A quietly_print N/A processing link: %s link N/A N/A N/A pool push link N/A N/A quietly_print waiting for downloads to finish N/A N/A N/A pool join N/A timer N/A N/A N/A time time timer N/A N/A report N/A N/A N/A N/A Lib globals listen N/A N/A N/A N/A timer update_interval N/A N/A N/A quietly_print N/A sleeping for %f seconds N/A update_interval timer N/A N/A N/A time sleep N/A update_interval timer N/A N/A N/A Exception N/A e N/A N/A N/A quietly_print N/A Recieved: %s e N/A N/A exit 0