Browse Source

Style fixes

master
Chris Smith 14 years ago
parent
commit
e987eb0a23
2 changed files with 6 additions and 5 deletions
  1. 4
    3
      src/Scraper.py
  2. 2
    2
      src/helloworld.py

+ 4
- 3
src/Scraper.py View File

@@ -2,9 +2,10 @@ from BeautifulSoup import BeautifulSoup
2 2
 from datetime import datetime
3 3
 import urllib2
4 4
 
5
-class scraper:
5
+class Scraper:
6 6
 
7
-    def scrape_spore(self, credentials):
7
+    @staticmethod
8
+    def scrape_spore(credentials):
8 9
         results = []
9 10
         url = "http://www.spore.com/view/achievements/%s" % credentials
10 11
         fmt = "%a %B %d, %Y"
@@ -22,4 +23,4 @@ class scraper:
22 23
         except urllib2.URLError, e:
23 24
           handleError(e)
24 25
 
25
-        return results
26
+        return results

+ 2
- 2
src/helloworld.py View File

@@ -1,5 +1,5 @@
1 1
 import cgi
2
-from Scraper import scraper
2
+from Scraper import Scraper
3 3
 import os
4 4
 from google.appengine.ext.webapp import template
5 5
 
@@ -105,7 +105,7 @@ class UpdatePage(webapp.RequestHandler):
105 105
         res = []
106 106
 
107 107
         if account.source.name == 'Spore':
108
-            res = scraper().scrape_spore(account.credentials)
108
+            res = Scraper.scrape_spore(account.credentials)
109 109
 
110 110
         UpdatePage.merge_achievements(account, res)
111 111
 

Loading…
Cancel
Save