Skip to content

Commit

Permalink
Fix/privatehd login (#7991)
Browse files Browse the repository at this point in the history
* Fix privatehd's login when no connection

* Fix cinemaz's login when no connection

* Add changelog
  • Loading branch information
duramato authored Apr 20, 2020
1 parent 942312b commit f1c2048
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Unreleased

#### New Features
- Add Keep link as post processing method ([7986](https://github.com/pymedusa/Medusa/pull/7986))
- Add Keep link as post processing method ([#7986](https://github.com/pymedusa/Medusa/pull/7986))

#### Improvements

#### Fixes

- Fixed PrivateHD and CinemaZ provider login ([#7991](https://github.com/pymedusa/Medusa/pull/7991))
-----

## 0.3.15 (2020-04-13)
Expand Down
3 changes: 3 additions & 0 deletions medusa/providers/torrent/html/cinemaz.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ def login(self):
return True

login_html = self.session.get(self.urls['login'])
if not login_html or not login_html.text:
log.warning('Unable to connect to provider')
return False
with BS4Parser(login_html.text, 'html5lib') as html:
token = html.find('input', attrs={'name': '_token'}).get('value')

Expand Down
3 changes: 3 additions & 0 deletions medusa/providers/torrent/html/privatehd.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ def login(self):
return True

login_html = self.session.get(self.urls['login'])
if not login_html or not login_html.text:
log.warning('Unable to connect to provider')
return False
with BS4Parser(login_html.text, 'html5lib') as html:
token = html.find('input', attrs={'name': '_token'}).get('value')

Expand Down

0 comments on commit f1c2048

Please sign in to comment.