1 from .common
import InfoExtractor
2 from ..utils
import smuggle_url
5 class KickStarterIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?kickstarter\.com/projects/(?P<id>[^/]*)/.*'
8 'url': 'https://www.kickstarter.com/projects/1404461844/intersection-the-story-of-josh-grant/description',
9 'md5': 'c81addca81327ffa66c642b5d8b08cab',
13 'title': 'Intersection: The Story of Josh Grant by Kyle Cowling',
15 'A unique motocross documentary that examines the '
16 'life and mind of one of sports most elite athletes: Josh Grant.'
20 'note': 'Embedded video (not using the native kickstarter video service)',
21 'url': 'https://www.kickstarter.com/projects/597507018/pebble-e-paper-watch-for-iphone-and-android/posts/659178',
25 'uploader_id': 'pebble',
26 'uploader': 'Pebble Technology',
27 'title': 'Pebble iOS Notifications',
31 'url': 'https://www.kickstarter.com/projects/1420158244/power-drive-2000/widget/video.html',
35 'title': 'Power Drive 2000',
39 def _real_extract(self
, url
):
40 video_id
= self
._match
_id
(url
)
41 webpage
= self
._download
_webpage
(url
, video_id
)
43 title
= self
._html
_search
_regex
(
44 r
'<title>\s*(.*?)(?:\s*—\s*Kickstarter)?\s*</title>',
46 video_url
= self
._search
_regex
(
47 r
'data-video-url="(.*?)"',
48 webpage
, 'video URL', default
=None)
49 if video_url
is None: # No native kickstarter, look for embedded videos
51 '_type': 'url_transparent',
53 'url': smuggle_url(url
, {'to_generic': True}),
57 thumbnail
= self
._og
_search
_thumbnail
(webpage
, default
=None)
59 thumbnail
= self
._html
_search
_regex
(
60 r
'<img[^>]+class="[^"]+\s*poster\s*[^"]+"[^>]+src="([^"]+)"',
61 webpage
, 'thumbnail image', fatal
=False)
66 'description': self
._og
_search
_description
(webpage
, default
=None),
67 'thumbnail': thumbnail
,