Exemplo n.º 1
0
    def info(self, el, url, torrent):
        torrent['magnet'] = el.magnet

        try:
            torrent['size'] = source_utils.de_string_size(el.size)
        except:
            pass

        try:
            torrent['seeds'] = int(el.seeds)
        except:
            pass

        return torrent
Exemplo n.º 2
0
    def info(self, el, url, torrent):
        torrent_url = self._find_url(el)
        if torrent_url[0] != '/':
            return None

        response = self._request.get(url.base + torrent_url)
        torrent['magnet'] = self.parse_magnet(response.text)

        try:
            size = self.parse_size(str(el))
            torrent['size'] = source_utils.de_string_size(size)
        except: pass

        try:
            seeds = self._find_seeds(el)
            if self._custom_parse_seeds is not None:
                seeds = self._custom_parse_seeds(seeds)
            torrent['seeds'] = int(seeds)
        except: pass

        return torrent