]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/kickstarter.py
56a76380cad6f45cb4a0a33581803f1371b2543b
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class KickStarterIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://www\.kickstarter\.com/projects/(?P<id>[^/]*)/.*'
12 'url': 'https://www.kickstarter.com/projects/1404461844/intersection-the-story-of-josh-grant?ref=home_location',
13 'md5': 'c81addca81327ffa66c642b5d8b08cab',
17 'title': 'Intersection: The Story of Josh Grant by Kyle Cowling',
18 'description': 'A unique motocross documentary that examines the '
19 'life and mind of one of sports most elite athletes: Josh Grant.',
22 'note': 'Embedded video (not using the native kickstarter video service)',
23 'url': 'https://www.kickstarter.com/projects/597507018/pebble-e-paper-watch-for-iphone-and-android/posts/659178',
29 'uploader_id': 'pebble',
30 'uploader': 'Pebble Technology',
31 'title': 'Pebble iOS Notifications',
37 def _real_extract(self
, url
):
38 m
= re
.match(self
._VALID
_URL
, url
)
39 video_id
= m
.group('id')
40 webpage
= self
._download
_webpage
(url
, video_id
)
42 title
= self
._html
_search
_regex
(
43 r
'<title>\s*(.*?)(?:\s*— Kickstarter)?\s*</title>',
45 video_url
= self
._search
_regex
(
46 r
'data-video-url="(.*?)"',
47 webpage
, 'video URL', default
=None)
48 if video_url
is None: # No native kickstarter, look for embedded videos
50 '_type': 'url_transparent',
60 'description': self
._og
_search
_description
(webpage
),
61 'thumbnail': self
._og
_search
_thumbnail
(webpage
),