diff --git a/CHANGELOG.md b/CHANGELOG.md index be1308cfa5..57bce85390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ #### Fixes - 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)) +- Fixed provider bj-share due to layout changes ([#7250](https://github.com/pymedusa/Medusa/pull/7250)) +- Fixed provider btdb due date format change in layout ([#7250](https://github.com/pymedusa/Medusa/pull/7250)) ----- diff --git a/medusa/clients/torrent/transmission.py b/medusa/clients/torrent/transmission.py index 39b5098d9b..5e82a8a3ae 100644 --- a/medusa/clients/torrent/transmission.py +++ b/medusa/clients/torrent/transmission.py @@ -283,7 +283,7 @@ def remove_ratio_reached(self): return try: - returned_data = json.loads(self.response.content) + returned_data = json.loads(self.response.text) except ValueError: log.warning('Unexpected data received from Transmission: {resp}', {'resp': self.response.content}) 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 = { diff --git a/medusa/providers/torrent/html/bjshare.py b/medusa/providers/torrent/html/bjshare.py index bb21836c18..02aa5701d1 100644 --- a/medusa/providers/torrent/html/bjshare.py +++ b/medusa/providers/torrent/html/bjshare.py @@ -177,8 +177,6 @@ def process_column_header(td): for result in torrent_rows[1:]: cells = result('td') result_class = result.get('class') - # When "Grouping Torrents" is enabled, the structure of table change - group_index = -2 if 'group_torrent' in result_class else 0 try: title = result.select('a[href^="torrents.php?id="]')[0].get_text() title = re.sub(r'\s+', ' ', title).strip() # clean empty lines and multiple spaces @@ -201,8 +199,8 @@ def process_column_header(td): if not all([title, download_url]): continue - seeders = try_int(cells[labels.index('Seeders') + group_index].get_text(strip=True)) - leechers = try_int(cells[labels.index('Leechers') + group_index].get_text(strip=True)) + seeders = try_int(cells[4].get_text(strip=True)) + leechers = try_int(cells[5].get_text(strip=True)) # Filter unseeded torrent if seeders < self.minseed: @@ -224,7 +222,7 @@ def process_column_header(td): torrent_details = torrent_details.replace('[', ' ').replace(']', ' ').replace('/', ' ') torrent_details = torrent_details.replace('Full HD ', '1080p').replace('HD ', '720p') - torrent_size = cells[labels.index('Tamanho') + group_index].get_text(strip=True) + torrent_size = cells[2].get_text(strip=True) size = convert_size(torrent_size) or -1 torrent_name = '{0} {1}'.format(title, torrent_details.strip()).strip() diff --git a/medusa/providers/torrent/html/btdb.py b/medusa/providers/torrent/html/btdb.py index 181b977255..53384a563d 100644 --- a/medusa/providers/torrent/html/btdb.py +++ b/medusa/providers/torrent/html/btdb.py @@ -121,7 +121,7 @@ def parse(self, data, mode): size = convert_size(torrent_size, default=-1) pubdate_raw = spans[2].get_text() - pubdate = self.parse_pubdate(pubdate_raw) + pubdate = self.parse_pubdate(pubdate_raw, human_time=True) item = { 'title': title,