Fix pytnon complaining about is keyword with literals
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Michel Roux 2020-04-09 11:31:35 +02:00
parent 8cac88d828
commit 9b6cae5dc2
2 changed files with 6 additions and 6 deletions

View File

@ -206,7 +206,7 @@ class Nyaa(Connector):
def search(self):
response = curl_content(self.get_full_search_url())
if response['http_code'] is 200:
if response['http_code'] == 200:
html = BeautifulSoup(response['output'], 'html.parser')
trs = html.select('table.torrent-list tr')
valid_trs = 0
@ -280,7 +280,7 @@ class Pantsu(Connector):
def search(self):
response = curl_content(self.get_full_search_url())
if response['http_code'] is 200:
if response['http_code'] == 200:
html = BeautifulSoup(response['output'], 'html.parser')
trs = html.select('div.results tr')
valid_trs = 0
@ -365,7 +365,7 @@ class YggTorrent(Connector):
if self.category:
response = curl_content(self.get_full_search_url())
if response['http_code'] is 200:
if response['http_code'] == 200:
html = BeautifulSoup(response['output'], 'html.parser')
trs = html.select('table.table tr')
valid_trs = 0
@ -440,7 +440,7 @@ class AnimeUltime(Connector):
def search(self):
response = curl_content(self.get_full_search_url(), {'search': self.query})
if response['http_code'] is 200:
if response['http_code'] == 200:
html = BeautifulSoup(response['output'], 'html.parser')
title = html.select('div.title')
@ -488,7 +488,7 @@ class AnimeUltime(Connector):
def get_history(self):
response = curl_content(self.get_full_search_url())
if response['http_code'] is 200:
if response['http_code'] == 200:
html = BeautifulSoup(response['output'], 'html.parser')
tables = html.select('table.jtable')
h3s = html.findAll('h3')

View File

@ -8,7 +8,7 @@ links = AnimeLink.query.all()
for link in links:
html = curl_content(link.link)
if html['http_code'] is not 200:
if html['http_code'] != 200:
print('(%d) %s %s : %s' % (html['http_code'], link.title.name, link.season, link.link))
elif 'darkgray' in str(html['output']):
print('(darkgray) %s %s : %s' % (link.title.name, link.season, link.link))