]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/egghead.py
db921465e1c6b14330a7e22be79c7a93c6e6ea7b
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class EggheadCourseIE(InfoExtractor
):
10 IE_DESC
= 'egghead.io course'
11 IE_NAME
= 'egghead:course'
12 _VALID_URL
= r
'https://egghead\.io/courses/(?P<id>[a-zA-Z_0-9-]+)'
14 'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript',
17 'id': 'professor-frisby-introduces-composable-functional-javascript',
18 'title': 'Professor Frisby Introduces Composable Functional JavaScript',
19 'description': 're:(?s)^This course teaches the ubiquitous.*You\'ll start composing functionality before you know it.$',
23 def _real_extract(self
, url
):
24 playlist_id
= self
._match
_id
(url
)
25 webpage
= self
._download
_webpage
(url
, playlist_id
)
27 title
= self
._html
_search
_regex
(r
'<h1 class="title">([^<]+)</h1>', webpage
, 'title')
28 ul
= self
._search
_regex
(r
'(?s)<ul class="series-lessons-list">(.*?)</ul>', webpage
, 'session list')
30 found
= re
.findall(r
'(?s)<a class="[^"]*"\s*href="([^"]+)">\s*<li class="item', ul
)
31 entries
= [self
.url_result(m
) for m
in found
]
37 'description': self
._og
_search
_description
(webpage
),