Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tidy
Browse files Browse the repository at this point in the history
bashonly committed Nov 10, 2023

Verified

This commit was signed with the committer’s verified signature.
jeertmans Jérome Eertmans
1 parent aa6f2ec commit 5c2e9db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions yt_dlp/extractor/thisoldhouse.py
Original file line number Diff line number Diff line change
@@ -60,19 +60,17 @@ class ThisOldHouseIE(InfoExtractor):
def _perform_login(self, username, password):
self._request_webpage(
HEADRequest('https://www.thisoldhouse.com/insider'), None, 'Requesting session cookies')

urlh = self._request_webpage(
'https://www.thisoldhouse.com/wp-login.php', None, 'Requesting login info',
errnote='Unable to login', query={'redirect_to': 'https://www.thisoldhouse.com/insider'})
login_info = {('client_id' if k == 'client' else k): v[0] for k, v in parse_qs(urlh.url).items()}

try:
auth_form = self._download_webpage(
self._LOGIN_URL, None, 'Submitting credentials', headers={
'Content-Type': 'application/json',
'Referer': urlh.url,
}, data=json.dumps(filter_dict({
**login_info,
**{('client_id' if k == 'client' else k): v[0] for k, v in parse_qs(urlh.url).items()},
'tenant': 'thisoldhouse',
'username': username,
'password': password,

0 comments on commit 5c2e9db

Please sign in to comment.