citcit / autoembed

Automatically exported from code.google.com/p/autoembed
GNU Lesser General Public License v3.0
0 stars 0 forks source link

YouTube HTTPS URLs are not being recognized as valid video URLs #65

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
YouTube HTTPS URLs are not being recognized as valid video URLs.

The regex pattern does not accommodate for secure URLs. 

Original issue reported on code.google.com by praveen....@gmail.com on 17 Feb 2013 at 7:04

GoogleCodeExporter commented 8 years ago
Any progress with this?
The script still cannot recognize youtube with HTTPS 

Original comment by eranhaz...@gmail.com on 6 Apr 2014 at 3:23

GoogleCodeExporter commented 8 years ago
if you want you can add another website to tubs:
  array(
      'title' => 'YouTube',
      'website' => 'https://www.youtube.com',
      'url-match' => 'https://(?:video\.google\.(?:com|com\.au|co\.uk|de|es|fr|it|nl|pl|ca|cn)/(?:[^"]*?))?(?:(?:www|au|br|ca|es|fr|de|hk|ie|in|il|it|jp|kr|mx|nl|nz|pl|ru|tw|uk)\.)?youtube\.com(?:[^"]*?)?(?:&|&|/|\?|;|\%3F|\%2F)(?:video_id=|v(?:/|=|\%3D|\%2F))([0-9a-z-_]{11})',
      'embed-src' => 'https://www.youtube.com/v/$2&rel=0&fs=1&hd=1',
      'embed-width' => '480',
      'embed-height' => '295',
      'image-src' => 'https://img.youtube.com/vi/$2/0.jpg',
      'iframe-player' => 'https://www.youtube.com/embed/$2',
  ),

Original comment by eranhaz...@gmail.com on 6 Apr 2014 at 3:31

GoogleCodeExporter commented 8 years ago
This is fairly easy to fix: `http://` becomes `https?://` and then supports 
both.

This is fixed in https://github.com/dereuromark/MediaEmbed

Original comment by dereurom...@gmail.com on 22 Jul 2014 at 2:56