示例#1
0
    def get_torrent_file(self, id):
        torrent = self.browser.get_torrent(id)
        if not torrent:
            return None

        if torrent.url is NotAvailable and torrent.magnet:
            raise MagnetOnly(torrent.magnet)
        return self.browser.open(torrent.url).content
示例#2
0
    def get_torrent_file(self, id):
        torrent = self.browser.get_torrent(id)
        if not torrent:
            return None

        if torrent.url is NotAvailable and torrent.magnet:
            raise MagnetOnly(torrent.magnet)
        return self.browser.openurl(torrent.url.encode('utf-8')).read()
示例#3
0
 def get_torrent_file(self):
     raise MagnetOnly(self.get_torrent().magnet)
示例#4
0
 def get_torrent_file(self, id):
     raise MagnetOnly(self.get_torrent(id).magnet)