fix(card): 修复cgc卡不存在抛异常
This commit is contained in:
@@ -279,7 +279,7 @@ class CardScraper:
|
||||
"""CGC"""
|
||||
r = await self.api.cgc(cert_number)
|
||||
html = Selector(r.text)
|
||||
if html.xpath('//div[@class="error" and @ng-show]').get() is None:
|
||||
if html.xpath('//div[@class="certlookup-search-box"]').get() is None:
|
||||
return
|
||||
|
||||
info_elements = html.xpath('//div[@class="content-wrapper"]//dl')
|
||||
|
||||
Reference in New Issue
Block a user