Skip to content

Commit

Permalink
Fixed beyond-hd parsing due to small layout changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
p0psicles committed Oct 11, 2019
1 parent 6d81717 commit 6594e7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

-----

Expand Down
10 changes: 5 additions & 5 deletions medusa/providers/torrent/html/beyondhd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 = {
Expand Down

0 comments on commit 6594e7a

Please sign in to comment.