File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change
1
+ import logging
2
+
3
+ logging .getLogger ("numba" ).setLevel (logging .INFO )
4
+ logging .getLogger ("PIL" ).setLevel (logging .INFO )
Original file line number Diff line number Diff line change 48
48
49
49
class BggSpider (SitemapSpider ):
50
50
name = "bgg"
51
- allowed_domains = ("boardgamegeek.com" ,)
51
+ allowed_domains = ("boardgamegeek.com" , "geekdo-images.com" )
52
52
53
53
# https://boardgamegeek.com/wiki/page/BGG_XML_API2
54
54
bgg_xml_api_url = "https://boardgamegeek.com/xmlapi2"
@@ -352,7 +352,7 @@ def parse_games(
352
352
bgg_ids = bgg_ids ,
353
353
page = page + 1 ,
354
354
priority = - page - 1 ,
355
- max_page = max_page ,
355
+ meta = { " max_page" : max_page } ,
356
356
)
357
357
358
358
for game in response .xpath ("/items/item" ):
@@ -663,8 +663,13 @@ def parse_poll(
663
663
if not poll or parse_int_from_elem (poll , "@totalvotes" ) < self .min_votes :
664
664
return default
665
665
666
+ votes = tuple (parse_votes (poll , attr , enum = enum ))
667
+
668
+ if not votes :
669
+ return default
670
+
666
671
try :
667
- return func (parse_votes ( poll , attr , enum = enum ) )
672
+ return func (votes )
668
673
except Exception :
669
674
self .logger .exception ("Error parsing poll <%s>" , name )
670
675
You can’t perform that action at this time.
0 commit comments