-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
[youporn] fix url metadata detection (width and bits) to allow best v… #20425
Conversation
Provide concrete examples of what it's supposed to fix. |
Oh, yes, sorry. I see the problem. Last second I switched to the example video from the file to prepare the URL example and it noticed just now that it is different, as in working with the "old" code. There are a few examples where the
Interesting is the I added the example to the list in the code. Speaking of output difference:
|
Add a test. |
Added a test and fixed the existing ones - anything more I can do to make this acceptable? Sorry I deleted the PR template but I thought it was for reporting issues - I think I added the important parts manually. |
@@ -145,9 +160,8 @@ def _real_extract(self, url): | |||
r'(?s)<div[^>]+class=["\']submitByLink["\'][^>]*>(.+?)</div>', | |||
webpage, 'uploader', fatal=False) | |||
upload_date = unified_strdate(self._html_search_regex( | |||
[r'Date\s+[Aa]dded:\s*<span>([^<]+)', | |||
r'(?s)<div[^>]+class=["\']videoInfo(?:Date|Time)["\'][^>]*>(.+?)</div>'], |
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.
Do not remove old patterns.
comment_count = str_to_int(self._search_regex( | ||
r'>All [Cc]omments? \(([\d,.]+)\)', | ||
webpage, 'comment count', fatal=False)) | ||
comment_count = len(re.findall(r'<div[^>]+class=([\"\']).*?videoComment\b.*?\1', webpage)) |
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.
Incorrect.
7b956a1
to
5e26784
Compare
The slash in the end seems to have gone, metadata format has changed. This fixes best file selection.
[x] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)
What is the purpose of your pull request?
[x] Bug fix
Please see more details below.