-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[AsianCrush] fix extractor, add support for yuyutv and Midnight Pulp #21290
Conversation
@remitamine sorry to bother you, but could you please take a look at this? (I think I've been understanding the code standards better now, so hopefully you won't have to leave as much feedback on this) |
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.
Merge video and playlist extractors into single video extractor and single playlist extractor.
I can do that for the main AsianCrushIE, but for the Playlist IE, it currently requires an additional site specific variable (the |
Nothing stops from rewriting it to use |
I don't understand? I'm referring to the last bit of this: title = remove_end(
self._html_search_regex(
r'(?s)<h1\b[^>]\bid=["\']movieTitle[^>]+>(.+?)</h1>', webpage,
'title', default=None) or self._og_search_title(
webpage, default=None) or self._html_search_meta(
'twitter:title', webpage, 'title',
default=None) or self._search_regex(
r'<title>([^<]+)</title>', webpage, 'title', fatal=False),
' | %s' % self._SITE_TITLE) I don't see how |
|
ed1b7b0
to
8861b4b
Compare
OK, I've made the requested changes. |
youtube_dl/extractor/asiancrush.py
Outdated
'kaltura:%s:%s' % (partner_id, kaltura_id), | ||
ie=KalturaIE.ie_key(), video_id=kaltura_id, | ||
video_title=title) | ||
description = self._html_search_regex(r'<div class="description">(.+?)</div>', webpage, 'description', fatal=False, flags=re.DOTALL) |
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.
Move flags into regex. Carry long lines.
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.
I'm confused about "Move flags into regex", I can't find a difference between the way this is implemented in other extractors.
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.
What difference are you even talking about?
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.
You said "Move flags into regex", I don't understand what you're asking me to do.
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 you aware what flags are at all?
|
||
|
||
class AsianCrushIE(InfoExtractor): | ||
_VALID_URL = r'https?://(?:www\.)?asiancrush\.com/video/(?:[^/]+/)?0+(?P<id>\d+)v\b' | ||
IE_NAME = 'asiancrush' | ||
_VALID_URL = r'https?://(?:www\.)?(?P<host>(?:asiancrush\.com|yuyutv\.com|midnightpulp\.com))/video/(?:[^/]+/)?0+(?P<id>\d+)v\b' |
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.
Move .com part outside the inner group.
@@ -96,15 +148,16 @@ def _real_extract(self, url): | |||
entries.append(self.url_result( | |||
mobj.group('url'), ie=AsianCrushIE.ie_key())) | |||
|
|||
title = remove_end( | |||
title = re.sub( |
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.
Breaks on None title.
Does not work:
|
…tv (closes #21281, closes #21290)
…tv (closes #21281, closes #21290)
… cocoro.tv (closes #21281, closes #21290)" This reverts commit a136b6e.
This reverts commit 8421fda.
… cocoro.tv (closes #21281, closes #21290)" This reverts commit a136b6e.
This reverts commit 8421fda.
…tv (closes #21281, closes #21290)
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
The AsianCrush extractor was partially broken (didn't extract description properly). This pull request fixes that, and also adds support for sister sites yuyutv and Midnight Pulp (closing #21281).