#!/usr/bin/env python __all__ = ['pptv_download', 'pptv_download_by_id'] from ..common import * import re import urllib import hashlib def pptv_download_by_id(id, title = None, output_dir = '.', merge = True, info_only = False): xml = get_html('http://web-play.pptv.com/webplay3-0-%s.xml?type=web.fpp' % id) host = r1(r'([^<>]+)', xml) key = r1(r']+>([^<>]+)', xml) rid = r1(r'rid="([^"]+)"', xml) title = r1(r'nm="([^"]+)"', xml) pieces = re.findall('