Remove useless error output
This commit is contained in:
@@ -125,8 +125,9 @@ class Scraping():
|
|||||||
continue
|
continue
|
||||||
json_data = json.loads(data)
|
json_data = json.loads(data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('[!] 出错啦')
|
# print('[!] 出错啦')
|
||||||
print(e)
|
# print(e)
|
||||||
|
pass
|
||||||
# if any service return a valid return, break
|
# if any service return a valid return, break
|
||||||
if self.get_data_state(json_data):
|
if self.get_data_state(json_data):
|
||||||
print(f"[+]Find movie [{name}] metadata on website '{source}'")
|
print(f"[+]Find movie [{name}] metadata on website '{source}'")
|
||||||
@@ -156,8 +157,9 @@ class Scraping():
|
|||||||
continue
|
continue
|
||||||
json_data = json.loads(data)
|
json_data = json.loads(data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('[!] 出错啦')
|
# print('[!] 出错啦')
|
||||||
print(e)
|
# print(e)
|
||||||
|
pass
|
||||||
# json_data = self.func_mapping[source](number, self)
|
# json_data = self.func_mapping[source](number, self)
|
||||||
# if any service return a valid return, break
|
# if any service return a valid return, break
|
||||||
if self.get_data_state(json_data):
|
if self.get_data_state(json_data):
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Javdb(Parser):
|
|||||||
try:
|
try:
|
||||||
resp = self.session.get(javdb_url)
|
resp = self.session.get(javdb_url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
#print(e)
|
||||||
raise Exception(f'[!] {self.number}: page not fond in javdb')
|
raise Exception(f'[!] {self.number}: page not fond in javdb')
|
||||||
|
|
||||||
self.querytree = etree.fromstring(resp.text, etree.HTMLParser())
|
self.querytree = etree.fromstring(resp.text, etree.HTMLParser())
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ class Parser:
|
|||||||
}
|
}
|
||||||
dic = self.extradict(dic)
|
dic = self.extradict(dic)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
#print(e)
|
||||||
dic = {"title": ""}
|
dic = {"title": ""}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, separators=(',', ':'))
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, separators=(',', ':'))
|
||||||
return js
|
return js
|
||||||
|
|||||||
Reference in New Issue
Block a user