HobbyistDev / yt-dlp

A youtube-dl fork with additional features and fixes
https://discord.gg/H5MNcFW63r
The Unlicense
0 stars 2 forks source link

[WIP][extractor/dailywire] Add login function, fix cookie not work #3

Closed HobbyistDev closed 1 year ago

HobbyistDev commented 2 years ago
Template ### Before submitting a *pull request* make sure you have: - [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding conventions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions) - [x] [Searched](https://github.com/yt-dlp/yt-dlp/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests - [x] Checked the code with [flake8](https://pypi.python.org/pypi/flake8) and [ran relevant tests](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) ### In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options: - [x] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/) - [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence) ### What is the purpose of your *pull request*? - [x] Fix or improvement to an extractor (Make sure to add/update tests) - [ ] New extractor ([Piracy websites will not be accepted](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy)) - [ ] Core bug fix/improvement - [ ] New feature (It is strongly [recommended to open an issue first](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#adding-new-feature-or-making-overarching-changes)) ### Description of your *pull request* and other information

DESCRIPTION TODO:

Sample url: https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2

Fixes #4 Potential fix for https://github.com/yt-dlp/yt-dlp/issues/4154

HobbyistDev commented 2 years ago

what do you get if you print(self.cookiejar) just above this?

Let's say the cookie is <cookie>

It's print this in the script:

<YoutubeDLCookieJar[]>
<YoutubeDLCookieJar[]>

But it works in curl with this command:

curl "https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" -H "Accept-Language: id,en-US;q=0.7,en;q=0.3" -H "DNT: 1" -H "Connection: keep-alive" -H "Referer: https://www.dailywire.com/callback?code=<code>&state=<state>"%"3D"%"3D" -H "Cookie: <cookie>" -H "Upgrade-Insecure-Requests: 1" -H "Sec-Fetch-Dest: document" -H "Sec-Fetch-Mode: navigate" -H "Sec-Fetch-Site: same-origin" -H "Sec-GPC: 1" -H "TE: trailers"
maximveksler commented 1 year ago

Was this merged?