def __init__(self, url):
self.libmms = ctypes.cdll.LoadLibrary(ctypes.util.find_library('mms'))
if self.libmms._name is None: # pylint:disable=protected-access
raise download_npo.Error(
'Deze video is in het (oude) MMS/WMV formaat; om dit te'
'downloaden heb je libmms nodig, welke niet is gevonden op je'
'systeem. Zie: http://sourceforge.net/projects/libmms/')
self._libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
mmsh_connect = self.libmms.mmsh_connect
mmsh_connect.restype = ctypes.POINTER(mmsh_t)
if sys.version_info[0] > 2:
url = bytes(url, 'utf-8')
self._mms = mmsh_connect(None, None, url, 128 * 1024)
malloc = self._libc.malloc
malloc.restype = ctypes.POINTER(ctypes.c_char)
self.buf = malloc(8192)
评论列表
文章目录