Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Interesting Python Scripts

Name: Anonymous 2009-03-31 12:28

Hey,
I just want to hear some stories about Python and what you did with it. I'm especially interested in if you have ever used mechanize & html5lib (Or something similiar) to write some bots/scrapers etc. for webpages. I actually think forum-bots/spam-bots etc. are annoying but at the same time very interesting, especially when they have got a minimal AI or something comparable to it.

Please don't call me a troll or whatever, that was a real question and I would like to have serious answers and maybe some interesting code-snippets. (Of course I can't force you guys).

Name: Haxus the Great 2009-03-31 12:33

Haxus the Great

Name: Anonymous 2009-03-31 12:35

>>2
Sadly, you didn't care.

Name: Anonymous 2009-03-31 12:36

Name: Anonymous 2009-03-31 12:38

The original version of 4scrape1 was in Python. Rewrote the front-end in Haskell because Python is almost SLOW AS FUCK (specifically: embedding a Python interpreter into each Apache daemon made a mess of things, and the Python FastCGI bindings are under-documented nightmares).

The scraper is still in Python though, and just uses urllib2. Never used mechanize or html5lib.

SORRY GUYS HE ASKED AND I COULDN'T RESIST. LOVE, TARO.
                       
References: [1] http://suigintou.desudesudesu.org/4scrape/index

Name: Anonymous 2009-03-31 12:38

>>4
So you basically scrape with the help of subjects.txt all /prog/ threads and save them into your own local MySQL? Cool, but why?

Name: Anonymous 2009-03-31 12:39

>>5
[quoute]SORRY GUYS HE ASKED AND I COULDN'T RESIST. LOVE, TARO.[/quote]

So, why are you apologizing?, Sorry I don't seem to get it.

Name: Anonymous 2009-03-31 12:43

>>6
Because you can then throw them into a fulltext index and search /prog/. Hey Xarn - why not put a small CGI wrapper around that and make it publicaly available?

Name: Anonymous 2009-03-31 12:49

>>5
Python's FCGI bindings are perfectly acceptable (I know because I've used them in the past). Chances are you just were too dull to understand them.

Name: Anonymous 2009-03-31 12:51

>>8
Because it's stupidly easy to run it on your own computer.

>>1
I wrote http://dis.4chan.org/read/prog/1185963886/59 and subsequently used it to flood some shitty Serissa-hosted board which is now blisfully dead.

Name: Anonymous 2009-03-31 13:02

>>6
You get replies from the only two people on /prog/ who actually know how to code and the best you can do is to confuse SQLite with MySQL? No wonder this place is going to shit.

Name: Anonymous 2009-03-31 13:29

>>9
Try using them for more than a one line script.

Name: Anonymous 2009-03-31 13:38

>>9
Which bindings did you use? I remember there being like 12 to choose from when I looked into it. I imagine some are better than others.

Name: Anonymous 2009-03-31 13:44

>>11
Calm down you idiot, it was just a stupid reading mistake, don't take anything and everything grave as if the worlds fate would depend upon it, for real now. If you can't deal with some mistakes (making mistakes is human, and fortunately I am) you should GTFO.

Name: Anonymous 2009-03-31 13:47

>>14
Toleration of idiotic mistakes leads to the devaluation of the ability not to make them. Or, put simply: kill yourself.

Name: Anonymous 2009-03-31 14:00

>>15
Or, put simply: kill yourself.

Back to /b/ now.

Name: Anonymous 2009-03-31 16:00

>>16
At least have some manners.

Name: Anonymous 2009-03-31 16:53

>>1
(Of course I can't force you guys).
force
forced
THE FORCED INDENTATION OF CODE THREAD OVER

Name: Anonymous 2009-03-31 16:56

Toleration of idiotic mistakes leads to the devaluation of the ability not to make them
self-aggrandizing bullshit
Oh hi, FrozenVoid

Name: Anonymous 2009-03-31 20:52

>>19
>>15 isn't FrozenVoid. Although the post does contain a superfluous colon, it isn't followed incorrectly by a capital letter. Plus, all the words are spelled correctly.

Name: Anonymous 2009-03-31 23:12

>>6,14,16,19
Same worthless faggot trying to make excuses for the fact he doesn't know shit about the differences between database products.

Name: Anonymous 2009-04-01 15:58

>>21
Na I was the 6 guys, I actually were surprised that I weren't the only one who didn't like FrozenVoid or whatever. So I'll just sage you, have a good day sir :)!

Name: Anonymous 2009-08-16 23:10

Lain.

Name: Anonymous 2009-11-02 12:41

>>10
Hello Storlek.

Name: Anonymous 2010-12-24 8:39

Don't change these.
Name: Email:
Entire Thread Thread List