Formatting
This commit is contained in:
parent
b7b51a1b70
commit
ab76d99377
@ -198,11 +198,13 @@ class Pantsu(Connector):
|
|||||||
'href': '%s%s' % (self.base_url, url['href']),
|
'href': '%s%s' % (self.base_url, url['href']),
|
||||||
'name': self.boldify(url.string),
|
'name': self.boldify(url.string),
|
||||||
'comment': '',
|
'comment': '',
|
||||||
'link': tds[2].decode_contents().replace('icon-magnet', 'fa fa-fw fa-magnet').replace(
|
'link': tds[2].decode_contents()
|
||||||
'icon-floppy', 'fa fa-fw fa-download'),
|
.replace('icon-magnet', 'fa fa-fw fa-magnet')
|
||||||
|
.replace('icon-floppy', 'fa fa-fw fa-download'),
|
||||||
'size': tds[3].string,
|
'size': tds[3].string,
|
||||||
'date': datetime.strptime(tds[7]['title'], '%m/%d/%Y, %I:%M:%S %p %Z+0').strftime(
|
'date': datetime
|
||||||
'%Y-%m-%d %H:%M:%S'),
|
.strptime(tds[7]['title'], '%m/%d/%Y, %I:%M:%S %p %Z+0')
|
||||||
|
.strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
'seeds': check_seeds,
|
'seeds': check_seeds,
|
||||||
'leechs': tds[5].string,
|
'leechs': tds[5].string,
|
||||||
'downloads': check_downloads,
|
'downloads': check_downloads,
|
||||||
@ -226,7 +228,8 @@ class YggTorrent(Connector):
|
|||||||
raise ConnectorException(self.title)
|
raise ConnectorException(self.title)
|
||||||
|
|
||||||
return '%s/engine/search?do=search&order=desc&sort=%s&category=2145&sub_category=%s&name=%s&page=%s' % (
|
return '%s/engine/search?do=search&order=desc&sort=%s&category=2145&sub_category=%s&name=%s&page=%s' % (
|
||||||
self.base_url, sort_type, category, self.query, page)
|
self.base_url, sort_type, category, self.query, page
|
||||||
|
)
|
||||||
|
|
||||||
def get_history(self, sort_type=default_sort, page=1, category=None):
|
def get_history(self, sort_type=default_sort, page=1, category=None):
|
||||||
if category is None:
|
if category is None:
|
||||||
@ -267,10 +270,10 @@ class YggTorrent(Connector):
|
|||||||
'lang': self.get_lang(url.string),
|
'lang': self.get_lang(url.string),
|
||||||
'href': url['href'],
|
'href': url['href'],
|
||||||
'name': self.boldify(url.string),
|
'name': self.boldify(url.string),
|
||||||
'comment': '<a href="%s#comm" target="_blank"><i class="fa fa-comments-o"></i>%s</a>' % (
|
'comment': '<a href="%s#comm" target="_blank"><i class="fa fa-comments-o"></i>%s</a>' %
|
||||||
url['href'], tds[3].string),
|
(url['href'], tds[3].string),
|
||||||
'link': '<a href="%s/engine/download_torrent?id=%s"><i class="fa fa-fw fa-download"></i></a>' % (
|
'link': '<a href="%s/engine/download_torrent?id=%s"><i class="fa fa-fw fa-download"></i></a>' %
|
||||||
self.base_url, re.search('/(\d+)', url['href']).group(1)),
|
(self.base_url, re.search(r'/(\d+)', url['href']).group(1)),
|
||||||
'size': tds[5].string,
|
'size': tds[5].string,
|
||||||
'date': datetime.fromtimestamp(int(tds[4].div.string)).strftime('%Y-%m-%d %H:%M:%S'),
|
'date': datetime.fromtimestamp(int(tds[4].div.string)).strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
'seeds': check_seeds,
|
'seeds': check_seeds,
|
||||||
@ -388,7 +391,7 @@ class Other(Connector):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def search(self, sort_type=None, page=1, category=None):
|
def search(self, sort_type=None, page=1, category=None):
|
||||||
return ([], False)
|
return [], False
|
||||||
|
|
||||||
def get_history(self, sort_type, page, category):
|
def get_history(self, sort_type, page, category):
|
||||||
return []
|
return []
|
||||||
|
Reference in New Issue
Block a user