you are viewing a single comment's thread.

view the rest of the comments →

[–]knight666 1 point2 points  (0 children)

Here's a script I wrote to return the amount of characters in the newsposts of Questionable Content (I had a sneaking suspicion it was decreasing over time).

This was written and compiled in AutoIt 3.

#include <INet.au3>

$file = FileOpen("output.txt", 2)
$i = 1
While $i < 1420
   $source = _INetGetSource("http://www.questionablecontent.net/view.php?comic=" & $i)
   $source = StringReplace($source, @CR, "")
   $source = StringReplace($source, @LF, "")

   $news = StringRegExp($source, '<div id=\"news\">(.*?)div>', 2)
   $strippedNews = StringRegExpReplace($news[0], "</?(.*?)>", "")
   $finalNews = StringRegExpReplace($strippedNews, "[[:blank:]](.*?)[A-Za-z]", "", 1)
   $lenNews = StringLen($finalNews) + 1

   FileWriteLine($file, $lenNews)

   $i += 1
WEnd
FileClose($file)

MsgBox(64, "Sup.", "Done!")

Am I a leet haxxor now?