Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Support shorten YouTube URL closes #1102 #1115

Merged
merged 4 commits into from
Nov 27, 2016
Merged

Conversation

giginet
Copy link
Member

@giginet giginet commented Nov 23, 2016

closes #1102

@Clpsplug @lambdalisue レビューお願いします

@giginet giginet self-assigned this Nov 23, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0008%) to 97.681% when pulling ba36a2d on support-shorten-url into eab2219 on develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0008%) to 97.681% when pulling 79c75f4 on support-shorten-url into eab2219 on develop.

@@ -4,7 +4,7 @@


PATTERN = re.compile(
r"https?://www\.youtube\.com/watch\?v=(?P<id>[a-zA-Z0-9_\-]+)"
r"https?://(www\.youtube\.com/watch\?v=|youtu\.be\/)(?P<id>[a-zA-Z0-9_\-]+)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あとで利用しないならグルーピングは不要かな。あと / のエスケープも不要だと思う。

https?://(?:www\.youtube\.com/watch\?v=|youtu\.be/)(...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

グルーピング不要とは()のこと?

@@ -25,6 +25,12 @@ def test_parse_youtube_urls(self):
value = parse_youtube_urls(value)
self.assertEqual(value, self._render_template(self.video_id))

def test_parse_shorten_youtube_urls(self):
"""短縮されたYouTubeのURLは展開される"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

短縮されたYouTubeのURLも展開される

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他のdocstringの書き方に合わせました

@giginet
Copy link
Member Author

giginet commented Nov 24, 2016

なおした

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0008%) to 97.681% when pulling 9adfd35 on support-shorten-url into eab2219 on develop.

@lambdalisue
Copy link
Member

バックスラッシュのエスケープ必要?

@giginet
Copy link
Member Author

giginet commented Nov 26, 2016

なおしました

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0008%) to 97.681% when pulling 853f035 on support-shorten-url into eab2219 on develop.

@giginet giginet merged commit ac344fe into develop Nov 27, 2016
@giginet
Copy link
Member Author

giginet commented Nov 27, 2016

さすがに良さそうだからマージ

@giginet giginet deleted the support-shorten-url branch November 27, 2016 16:56
@lambdalisue
Copy link
Member

lgtm!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

作品のトレイラーにYouTubeの短縮URLを使用できない
3 participants