| Author |
Message |
|
leeds_manc
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 8:19 pm Posts: 5071 Location: Manchester
|
For every 10 minutes I just say that time in days, so a 20 minute job could take 2 days. A 5 minute job will take 6 hours.
|
| Fri Aug 21, 2009 5:40 pm |
|
 |
|
finlay666
Spends far too much time on here
Joined: Thu Apr 23, 2009 9:40 pm Posts: 4876 Location: Newcastle
|
Surely a 5 minute job could be 12 hours?
_________________TwitterCharlie Brooker: Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.
|
| Fri Aug 21, 2009 5:54 pm |
|
 |
|
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
Calculated using the following if anyone else wants to ratify my results or view the script:  |  |  |  | Code: import os, glob, string from operator import itemgetter from urllib import urlopen
"""Method that prints the results nicely""" def printResults(): #Produce a sorted list of tuples scores = sorted(results.items(), key=itemgetter(1), reverse=True) for score in scores: #Iterate over the tuples, printing them print score[0].ljust(25) , score[1]
"""Method that add's a person's posts to the results dictionary""" def addPost(person): if results.has_key(person): results[person] += 1 else: results[person] = 1
"""Method that finds all the posts in a page, and adds the posts to the dictionary of results""" def findPosts(text): startPost, startName, endName = 0,0,0 while True: startPost = text.find('by <strong><a href="./memberlist.php?mode=viewprofile&u=', endName) if startPost == -1: break startName = text.find('">',startPost) + 2 endName = text.find('</a>', startName) addPost(text[startName:endName])
"""Method that grabs all the pages in the thread from the web""" def grabFiles(): thread = input('Enter the thread id of the thread to be counted: ') pages = input('Enter the number of pages to be counted: ') html = ''
for page in range (0, pages): url = 'http://www.x404.co.uk/forum/viewtopic.php?f=3&t=' + `thread` + '&start=' + `15*page` html += urlopen(url).read() return html
results = {} #Dictionary to store each poster's current post count
findPosts(grabFiles()) printResults()
|  |  |  |  |
It should be noted that the screen-scraping is even more hideous than it was at Dennis' site, so if anyone does spot any issues do raise them! I've tested it on a few pages, but it wasn't monstrously thorough.
|
| Fri Aug 21, 2009 5:58 pm |
|
 |
|
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5163 Location: /dev/tty0
|
Phew, that was quite a lead In other news, it's very quiet on here tonight...
|
| Fri Aug 21, 2009 7:51 pm |
|
 |
|
Paul1965
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 8:29 pm Posts: 5975
|
Well done, sir! A well-deserved victory!
_________________ "I hadn't known there were so many idiots in the world until I started using the Internet." - Stanislaw Lem
|
| Fri Aug 21, 2009 8:16 pm |
|
 |
|
mars-bar-man
Doesn't have much of a life
Joined: Fri Apr 24, 2009 4:00 pm Posts: 940 Location: Pompy
|
_________________Just your friendly neighbourhood mars-bar-man.flickr
|
| Fri Aug 21, 2009 8:34 pm |
|
 |
|
pcernie
Legend
Joined: Sun Apr 26, 2009 12:30 pm Posts: 45931 Location: Belfast
|
_________________Plain English advice on everything money, purchase and service related:
http://www.moneysavingexpert.com/
|
| Fri Aug 21, 2009 9:18 pm |
|
 |
|
brataccas
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:14 pm Posts: 5664 Location: Scotland
|
I have yet to hear a forum make any audable sound 
_________________
|
| Sat Aug 22, 2009 12:30 am |
|
 |
|
leeds_manc
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 8:19 pm Posts: 5071 Location: Manchester
|
Work days 
|
| Sat Aug 22, 2009 12:32 am |
|
 |
|
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5163 Location: /dev/tty0
|
Then for me it'd be 7 hours 24 minutes...(not including lunch) Must be nice to work a 6 hour day
|
| Sat Aug 22, 2009 9:18 am |
|
 |
|
leeds_manc
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 8:19 pm Posts: 5071 Location: Manchester
|
I work closer to a ten hour day including lunch.
|
| Sat Aug 22, 2009 9:51 am |
|
 |
|
Paul1965
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 8:29 pm Posts: 5975
|
Saw this individual in London on Thursday but his identity remains a mystery..... 
_________________ "I hadn't known there were so many idiots in the world until I started using the Internet." - Stanislaw Lem
|
| Sat Aug 22, 2009 9:57 am |
|
 |
|
ProfessorF
What's a life?
Joined: Thu Apr 23, 2009 7:56 pm Posts: 12030
|
Hmm. He has placards. Maybe he's onto something.
|
| Sat Aug 22, 2009 10:04 am |
|
 |
|
pcernie
Legend
Joined: Sun Apr 26, 2009 12:30 pm Posts: 45931 Location: Belfast
|
^ It's definitely not Bratty - there's no  smilies on them... 
_________________Plain English advice on everything money, purchase and service related:
http://www.moneysavingexpert.com/
|
| Sat Aug 22, 2009 10:13 am |
|
 |
|
leeds_manc
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 8:19 pm Posts: 5071 Location: Manchester
|
And he's black. What? I like to start with the obvious.
|
| Sat Aug 22, 2009 1:18 pm |
|
|