aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--youtube_dl/extractor/brightcove.py3
-rw-r--r--youtube_dl/utils.py3
2 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py
index b41cee91b..c6ad1d065 100644
--- a/youtube_dl/extractor/brightcove.py
+++ b/youtube_dl/extractor/brightcove.py
@@ -383,8 +383,7 @@ class BrightcoveInPageEmbedIE(InfoExtractor):
return None
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- account_id, player_id, embed, video_id = mobj.groups()
+ account_id, player_id, embed, video_id = re.match(self._VALID_URL, url).groups()
webpage = self._download_webpage('http://players.brightcove.net/%s/%s_%s/index.min.js' % (account_id, player_id, embed), video_id)
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index bcebf9cc5..518cea98b 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -252,7 +252,8 @@ def extract_attributes(attributes_str, attributes_regex=r'(?s)\s*([^\s=]+)\s*=\s
attributes = re.findall(attributes_regex, attributes_str)
attributes_dict = {}
if attributes:
- attributes_dict = {attribute_name: attribute_value for (attribute_name, attribute_value) in attributes}
+ for (attribute_name, attribute_value) in attributes:
+ attributes_dict[attribute_name] = attribute_value
return attributes_dict