From 6594e7a79612949b9349e6ec283b3ca0b47535b2 Mon Sep 17 00:00:00 2001 From: P0psicles Date: Fri, 11 Oct 2019 20:18:07 +0200 Subject: [PATCH] Fixed beyond-hd parsing due to small layout changes. --- CHANGELOG.md | 1 + medusa/providers/torrent/html/beyondhd.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37e4e8e1d9..b6b5eeb3bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed AnimeBytes daily search, for multi-ep results ([#7190](https://github.com/pymedusa/Medusa/pull/7190)) - Fixed rare UnicodeDecodeError when parsing titles with Python 2.7 ([#7192](https://github.com/pymedusa/Medusa/pull/7192)) - Fixed torrent checker for client Transmission running on python 3 ([#7250](https://github.com/pymedusa/Medusa/pull/7250)) +- Fixed provider beyond-hd due to layout changes ([#7250](https://github.com/pymedusa/Medusa/pull/7250)) ----- diff --git a/medusa/providers/torrent/html/beyondhd.py b/medusa/providers/torrent/html/beyondhd.py index dd3c54c740..d555edad7a 100644 --- a/medusa/providers/torrent/html/beyondhd.py +++ b/medusa/providers/torrent/html/beyondhd.py @@ -111,14 +111,14 @@ def parse(self, data, mode): cells = result('td') try: - link = cells[1].find('a') + link = cells[1].find('div') download_url = urljoin(self.url, cells[2].find('a')['href']) title = link.get_text(strip=True) if not all([title, download_url]): continue - seeders = int(cells[6].find('span').get_text()) - leechers = int(cells[7].find('span').get_text()) + seeders = int(cells[5].find('span').get_text()) + leechers = int(cells[6].find('span').get_text()) # Filter unseeded torrent if seeders < self.minseed: @@ -128,10 +128,10 @@ def parse(self, data, mode): title, seeders) continue - torrent_size = cells[5].find('span').get_text() + torrent_size = cells[4].find('span').get_text() size = convert_size(torrent_size, units=units) or -1 - pubdate_raw = cells[4].find('span').get_text() + pubdate_raw = cells[3].find('span').get_text() pubdate = self.parse_pubdate(pubdate_raw, human_time=True) item = {