-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DoodStream] Add extractor #32979
base: master
Are you sure you want to change the base?
[DoodStream] Add extractor #32979
Conversation
de01b5d
to
6456200
Compare
31d3220
to
dde081c
Compare
dde081c
to
c09207a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update and decoding the pass_md5/token stuff.
I've made some comments for information, but I'll apply the changes to the old PR with attribution. The question to be settled is whether the '/d/' page ever embeds a link other than the matching '/e/' page.
youtube_dl/extractor/doodstream.py
Outdated
auth_url = ('https://%s/' % host) + self._html_search_regex( | ||
r'(/pass_md5.*?)\'', webpage, 'pass_md5') | ||
headers = { | ||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/66.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be necessary:
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/66.0', |
youtube_dl/extractor/doodstream.py
Outdated
final_url = authpage + ''.join([random.choice(string.ascii_letters + string.digits) for _ in | ||
range(10)]) + "?token=" + token + "&expiry=" + str(int(time.time() * 1000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer (with whatever indentation flake8 allows):
final_url = authpage + ''.join([random.choice(string.ascii_letters + string.digits) for _ in | |
range(10)]) + "?token=" + token + "&expiry=" + str(int(time.time() * 1000)) | |
final_url = update_url_query( | |
authpage + ''.join((random.choice(string.ascii_letters + string.digits) | |
for _ in range(10))), { | |
'token': token, | |
'expiry': int(time.time() * 1000), | |
}) |
But in the original, s/str/compat_str/.
update of outdated extractors:
Closes #28903.
Closes #28008.
Closes #31003