Skip to content

Commit

Permalink
FURB167
Browse files Browse the repository at this point in the history
  • Loading branch information
gamer191 committed Jun 28, 2024
1 parent 903efd8 commit 0205c8e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion yt_dlp/extractor/mit.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _real_extract(self, url):
video_id = self._match_id(url)
raw_page = self._download_webpage(
f'http://techtv.mit.edu/videos/{video_id}', video_id)
clean_page = re.compile(r'<!--.*?-->', re.S).sub('', raw_page)
clean_page = re.compile(r'<!--.*?-->', re.DOTALL).sub('', raw_page)

base_url = self._proto_relative_url(self._search_regex(
r'ipadUrl: \'(.+?cloudfront.net/)', raw_page, 'base url'), 'http:')
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/myvideoge.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _real_extract(self, url):
# translate any ka month to an en one
re.sub('|'.join(self._MONTH_NAMES_KA),
lambda m: MONTH_NAMES['en'][self._MONTH_NAMES_KA.index(m.group(0))],
upload_date, flags=re.I))
upload_date, flags=re.IGNORECASE))
if upload_date else None)

return {
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/neteasemusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def _real_extract(self, url):
'title': self._og_search_property('title', webpage, 'title', fatal=False),
'description': self._html_search_regex(
(rf'<div[^>]+\bid="album-desc-{suffix}"[^>]*>(.*?)</div>' for suffix in ('more', 'dot')),
webpage, 'description', flags=re.S, fatal=False),
webpage, 'description', flags=re.DOTALL, fatal=False),
'thumbnail': self._og_search_property('image', webpage, 'thumbnail', fatal=False),
'upload_date': unified_strdate(self._html_search_meta('music:release_date', webpage, 'date', fatal=False)),
}
Expand Down
8 changes: 4 additions & 4 deletions yt_dlp/jsinterp.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ class JSInterpreter:
# TODO: new pattern class to execute matches with these flags
'd': 1024, # Generate indices for substring matches
'g': 2048, # Global search
'i': re.I, # Case-insensitive search
'm': re.M, # Multi-line search
's': re.S, # Allows . to match newline characters
'u': re.U, # Treat a pattern as a sequence of unicode code points
'i': re.IGNORECASE, # Case-insensitive search
'm': re.MULTILINE, # Multi-line search
's': re.DOTALL, # Allows . to match newline characters
'u': re.UNICODE, # Treat a pattern as a sequence of unicode code points
'y': 4096, # Perform a "sticky" search that matches starting at the current position in the target string
}

Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5118,7 +5118,7 @@ def orderedSet_from_options(options, alias_dict, *, use_regex=False, start=None)
requested = orderedSet_from_options(val, alias_dict, start=requested)
continue

current = (filter(re.compile(val, re.I).fullmatch, alias_dict['all']) if use_regex
current = (filter(re.compile(val, re.IGNORECASE).fullmatch, alias_dict['all']) if use_regex
else [val] if val in alias_dict['all'] else None)
if current is None:
raise ValueError(val)
Expand Down

0 comments on commit 0205c8e

Please sign in to comment.