2015-12-13 19:15:45 +08:00
# coding: utf-8
2014-01-29 15:34:35 +01:00
from __future__ import unicode_literals
2017-02-03 05:10:13 +01:00
from . . compat import (
2018-01-23 22:23:12 +07:00
compat_b64decode ,
2017-02-03 05:10:13 +01:00
compat_urllib_parse_unquote ,
compat_urlparse ,
)
2017-10-12 17:39:51 +00:00
from . . utils import (
determine_ext ,
update_url_query ,
)
2016-02-27 02:55:11 +08:00
from . bokecc import BokeCCBaseIE
2013-06-23 21:14:19 +02:00
2016-02-27 02:55:11 +08:00
class InfoQIE ( BokeCCBaseIE ) :
2015-06-25 19:54:44 +06:00
_VALID_URL = r ' https?://(?:www \ .)?infoq \ .com/(?:[^/]+/)+(?P<id>[^/]+) '
2014-04-20 01:01:37 +02:00
2015-06-25 19:54:44 +06:00
_TESTS = [ {
2014-04-21 02:55:35 +02:00
' url ' : ' http://www.infoq.com/presentations/A-Few-of-My-Favorite-Python-Things ' ,
2014-04-21 03:21:34 +02:00
' md5 ' : ' b5ca0e0a8c1fed93b0e65e48e462f9a2 ' ,
2014-04-21 02:55:35 +02:00
' info_dict ' : {
2015-12-13 19:15:45 +08:00
' id ' : ' A-Few-of-My-Favorite-Python-Things ' ,
2014-04-21 02:55:35 +02:00
' ext ' : ' mp4 ' ,
' description ' : ' Mike Pirnat presents some tips and tricks, standard libraries and third party packages that make programming in Python a richer experience. ' ,
' title ' : ' A Few of My Favorite [Python] Things ' ,
2013-06-27 20:27:08 +02:00
} ,
2015-06-25 19:54:44 +06:00
} , {
' url ' : ' http://www.infoq.com/fr/presentations/changez-avis-sur-javascript ' ,
' only_matching ' : True ,
2015-12-13 19:15:45 +08:00
} , {
' url ' : ' http://www.infoq.com/cn/presentations/openstack-continued-delivery ' ,
' md5 ' : ' 4918d0cca1497f2244572caf626687ef ' ,
' info_dict ' : {