XayOn / katcr

Search in multiple torrent sites from your CLI
GNU General Public License v3.0
69 stars 3 forks source link

AttributeError #141

Closed BachoSeven closed 3 years ago

BachoSeven commented 3 years ago

Describe the bug

Cannot search via the default engines:

> katcr search ubuntu

Starting search on Katcr, ThePirateBay, Eztv, NyaaSi, Skytorrents

  AttributeError

  'NoneType' object has no attribute 'text'

  at .local/lib/python3.8/site-packages/torrentmirror/__init__.py:46 in get_proxies
      42│             status = row.find(class_='proxy-statues')
      43│             percentage = row.find(class_='proxy-like').find(class_='counts')
      44│             proxies[link.find('span').text].append(
      45│                 dict(link=name_.find('a').attrs['href'],
    → 46│                      percentage=int(percentage.text.replace('%', '')),
      47│                      status=status.text.strip()))
      48│
      49│     proxies = dict(proxies)
      50│     pickle.dump(proxies, CACHE_FILE.open('wb'))
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f0be12ae2b0>

Desktop (please complete the following information):

Version

XayOn commented 3 years ago

For some reason, torrentmirror seems to have stopped working. I've updated a change that allows katcr to work if torrentmirror fails, that is specially useful if you use Jackett engine.

XayOn commented 3 years ago

Most important providers seem to be working fine without proxies right now.

XayOn commented 3 years ago

@BachoSeven I've uploaded a new release with this change and another minor one. Relying on scrapping always causes troubles, this release allows katcr to work without available proxies, thus allowing a complete jackett instalation without any scrapping.