]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/embedly.py
[ie/generic] Add `key_query` extractor-arg
[yt-dlp.git] / yt_dlp / extractor / embedly.py
index 1b58fca60f3e908f76c011811194a3d5b623a4be..a424b49df7d7bfeb27f7b664ce0b08dd3dbf1ba6 100644 (file)
@@ -61,6 +61,35 @@ class EmbedlyIE(InfoExtractor):
         'only_matching': True,
     }]
 
+    _WEBPAGE_TESTS = [{
+        'url': 'http://www.permacultureetc.com/2022/12/comment-greffer-facilement-les-arbres-fruitiers.html',
+        'info_dict': {
+            'id': 'pfUK_ADTvgY',
+            'ext': 'mp4',
+            'title': 'Comment greffer facilement les arbres fruitiers ? (mois par mois)',
+            'description': 'md5:d3a876995e522f138aabb48e040bfb4c',
+            'view_count': int,
+            'upload_date': '20221210',
+            'comment_count': int,
+            'live_status': 'not_live',
+            'channel_id': 'UCsM4_jihNFYe4CtSkXvDR-Q',
+            'channel_follower_count': int,
+            'tags': ['permaculture', 'jardinage', 'dekarz', 'autonomie', 'greffe', 'fruitiers', 'arbres', 'jardin forêt', 'forêt comestible', 'damien'],
+            'playable_in_embed': True,
+            'uploader': 'permaculture agroécologie etc...',
+            'channel': 'permaculture agroécologie etc...',
+            'thumbnail': 'https://i.ytimg.com/vi/pfUK_ADTvgY/sddefault.jpg',
+            'duration': 1526,
+            'channel_url': 'https://www.youtube.com/channel/UCsM4_jihNFYe4CtSkXvDR-Q',
+            'age_limit': 0,
+            'uploader_id': 'permacultureetc',
+            'like_count': int,
+            'uploader_url': 'http://www.youtube.com/user/permacultureetc',
+            'categories': ['Education'],
+            'availability': 'public',
+        },
+    }]
+
     @classmethod
     def _extract_from_webpage(cls, url, webpage):
         # Bypass "ie=cls" and suitable check
@@ -77,4 +106,4 @@ def _real_extract(self, url):
             return self.url_result(src, YoutubeTabIE)
         return self.url_result(smuggle_url(
             urllib.parse.unquote(traverse_obj(qs, ('src', 0), ('url', 0))),
-            {'http_headers': {'Referer': url}}))
+            {'referer': url}))