Skip to content

Commit

Permalink
Merge pull request #1 from judenaveenraj/master
Browse files Browse the repository at this point in the history
blah
  • Loading branch information
sidchan committed Feb 29, 2012
2 parents 1b73607 + c085d56 commit 5a38c8d
Show file tree
Hide file tree
Showing 5 changed files with 952 additions and 0 deletions.
20 changes: 20 additions & 0 deletions linkgrab.py
@@ -0,0 +1,20 @@
import urllib2
from bs4 import BeautifulSoup as bs
import threading
import scoregrab

class Gamespot(threading.Thread):
def __init__(self,url):
self.url=url

def run(self):
page=urllib2.urlopen(self.url).read()
parser=bs(page)
a=parser.find("table",{"summary":"GameSpot's All Reviews"})
game=a.tbody.tr
while (game):
title=str(game.th.a.contents[0])

scorgrab.Gamespot()
platform=a.tbody.td.span.contents[0]
scoreline=a.find("td",{"class":"score"})
36 changes: 36 additions & 0 deletions main.py
@@ -0,0 +1,36 @@
import urllib2
from bs4 import BeautifulSoup as bs
import thread
import scoregrab
import linkgrab

GRABSITES=[]
LINKSITES=[]
GRABCOUNT=0
LINKCOUNT=0


def main():
while LINKSITES:
if LINKCOUNT<10:
if "gamespot" in link:
linkgrab.Gamespot(link).start()
LINKCOUNT+=1
else:
time.sleep(0.1)


#def main():
#while WEBSITES:
#if COUNT<6:
#for site in WEBSITES:
#if "gamespot" in site:
#print Gamespot(site).start()
#else:
#time.sleep(0.1)
#print "done"



if __name__=="__main__":
main()
10 changes: 10 additions & 0 deletions ratingagreg.wpr
@@ -0,0 +1,10 @@
#!wing
#!version=3.0
##################################################################
# Wing IDE project file #
##################################################################
[project attributes]
proj.file-list = [loc('linkgrab.py'),
loc('main.py'),
loc('scoregrab.py')]
proj.file-type = 'shared'

0 comments on commit 5a38c8d

Please sign in to comment.