Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from judenaveenraj/master
blah
- Loading branch information
Showing
5 changed files
with
952 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
Oops, something went wrong.