diff --git a/weboob/backends/gazelle/pages/torrents.py b/weboob/backends/gazelle/pages/torrents.py index e065a5f3..819dff1d 100644 --- a/weboob/backends/gazelle/pages/torrents.py +++ b/weboob/backends/gazelle/pages/torrents.py @@ -169,4 +169,10 @@ class TorrentsPage(BasePage): if title and body: torrent.description += '%s\n\n%s\n' % (title, body) + div = self.document.getroot().cssselect('div#files_%s' % torrent.id) + if div: + for tr in div[0].find('table'): + if tr.attrib.get('class', None) != 'colhead_dark': + torrent.files.append(tr.find('td').text) + return torrent diff --git a/weboob/frontends/weboorrents/application.py b/weboob/frontends/weboorrents/application.py index ae50f9ad..6dc7b4d6 100644 --- a/weboob/frontends/weboorrents/application.py +++ b/weboob/frontends/weboorrents/application.py @@ -62,6 +62,8 @@ class Weboorrents(ConsoleApplication): rows.append(('Seeders', torrent.seeders)) rows.append(('Leechers', torrent.leechers)) rows.append(('Description', torrent.description)) + if torrent.files: + rows.append(('Files', '\n'.join(torrent.files))) return {backend.name: rows} @ConsoleApplication.command('Search torrents')