ソースを参照

Less debug messages

Foppe Hemminga 6 年 前
コミット
416135d6d7
4 ファイル変更6 行追加5 行削除
  1. 1 0
      .idea/dictionaries/foppe.xml
  2. 1 1
      _bs.py
  3. 1 1
      model.py
  4. 3 3
      racenet.py

+ 1 - 0
.idea/dictionaries/foppe.xml

@@ -7,6 +7,7 @@
       <w>dotenv</w>
       <w>pytz</w>
       <w>racenet</w>
+      <w>racingaustralia</w>
       <w>sratchings</w>
       <w>unixtime</w>
       <w>webpage</w>

+ 1 - 1
_bs.py

@@ -213,5 +213,5 @@ def get_racenet_json(html):
         if match:
             print('match')
             json = match.group(1)
-    pprint(json)
+    # pprint(json)
     return json

+ 1 - 1
model.py

@@ -6,7 +6,7 @@ import pytz
 import datetime
 # import time
 import psycopg2.extras
-from pprint import pprint
+# from pprint import pprint
 import arrow
 import view
 

+ 3 - 3
racenet.py

@@ -21,19 +21,19 @@ data_all = json.loads(my_json)
 data = data_all["MainPageState"]["receivedData"][0]
 name = data['name']
 
-print(name)
+# print(name)
 items = 0
 for d in data['data']:
     items += 1
     # pprint(d)
-    print('item {}'.format(items))
+    # print('item {}'.format(items))
     country = d['venue']['countryId']
     is_aus = True if country == 'AUS' else False
     timezone = local_timezones[d['venue']['state']] if is_aus else 'Pacific/Auckland'
     venue = '{} {}{} {}'.format(d['venue']['name'], d['venue']['countryId'],
                                 '/' + d['venue']['state'] if is_aus else '',
                                 timezone)
-    print(venue)
+    # print(venue)
     races = d['races']
     scratchings = []
     for race in races: