From 407b97b49112345ea3dfe76f1a5ae41586c4ffb1 Mon Sep 17 00:00:00 2001 From: Kura Date: Sat, 9 Dec 2017 15:01:27 +0000 Subject: [PATCH] Fixed merge issue --- pelican_youtube/youtube.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/pelican_youtube/youtube.py b/pelican_youtube/youtube.py index a99082c..a79f55a 100644 --- a/pelican_youtube/youtube.py +++ b/pelican_youtube/youtube.py @@ -31,19 +31,10 @@ class YouTube(Directive): Based on the YouTube directive by Brian Hsu: https://gist.github.com/1422773 -<<<<<<< HEAD VIDEO_ID is required, other arguments are optional Usage: .. youtube:: VIDEO_ID -======= - VIDEO_ID is required, with / height are optional integer, - - Usage: - .. youtube:: VIDEO_ID - :width: 640 - :height: 480 ->>>>>>> d34a1ac35df85cdc779ad8add1b2c316d1ddbfaf """ def boolean(argument): @@ -51,22 +42,14 @@ def boolean(argument): value = directives.choice(argument, ('yes', 'True', 'no', 'False')) return value in ('yes', 'True') - def yesno(argument): - return directives.choice(argument, ('yes', 'no')) - required_arguments = 1 optional_arguments = 5 option_spec = { 'class': directives.unchanged, 'width': directives.positive_int, 'height': directives.positive_int, -<<<<<<< HEAD 'allowfullscreen': boolean, 'seamless': boolean, -======= - 'align': align, # back compatibility - 'nocookie': yesno, ->>>>>>> d34a1ac35df85cdc779ad8add1b2c316d1ddbfaf } final_argument_whitespace = False @@ -74,13 +57,7 @@ def yesno(argument): def run(self): videoID = self.arguments[0].strip() -<<<<<<< HEAD url = 'https://www.youtube.com/embed/{}'.format(videoID) -======= - width = 420 - height = 315 - domain = 'www.youtube.com' ->>>>>>> d34a1ac35df85cdc779ad8add1b2c316d1ddbfaf width = self.options['width'] if 'width' in self.options else None height = self.options['height'] if 'height' in self.options else None @@ -97,7 +74,6 @@ def run(self): css_classes += ' {}'.format('youtube-16x9') # no additional classes if dimensions (height/width) are specified -<<<<<<< HEAD iframe_arguments = [ (width, 'width="{}"'), (height, 'height="{}"'), @@ -112,16 +88,6 @@ def run(self): embed_block += (format + ' ').format(value) if value else '' embed_block = embed_block[:-1] + '>' -======= - if 'nocookie' in self.options and self.options['nocookie'] == 'yes': - domain = 'www.youtube-nocookie.com' - - - url = 'https://{}/embed/{}'.format(domain, videoID) - div_block = '
' - embed_block = ''.format(width, height, url) ->>>>>>> d34a1ac35df85cdc779ad8add1b2c316d1ddbfaf return [ nodes.raw('', div_block, format='html'),