<s> from __future__ import unicode_literals <EOL> import json <EOL> from . common import InfoExtractor <EOL> class TriluliluIE ( InfoExtractor ) : <EOL> _VALID_URL = r'<STR_LIT>' <EOL> _TEST = { <EOL> '<STR_LIT:url>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:id>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:title>' : '<STR_LIT>' , <EOL> '<STR_LIT:description>' : '<STR_LIT>' , <EOL> } , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : True <EOL> } <EOL> } <EOL> def _real_extract ( self , url ) : <EOL> video_id = self . _match_id ( url ) <EOL> webpage = self . _download_webpage ( url , video_id ) <EOL> title = self . _og_search_title ( webpage ) <EOL> thumbnail = self . _og_search_thumbnail ( webpage ) <EOL> description = self . _og_search_description ( webpage ) <EOL> log_str = self . _search_regex ( <EOL> r'<STR_LIT>' , webpage , '<STR_LIT>' ) <EOL> log = json . loads ( log_str ) <EOL> format_url = ( '<STR_LIT>' <EOL> '<STR_LIT>' % log ) <EOL> format_doc = self . _download_xml ( <EOL> format_url , video_id , <EOL> note = '<STR_LIT>' , <EOL> errnote = '<STR_LIT>' ) <EOL> video_url_template = ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' % <EOL> log ) <EOL> formats = [ <EOL> { <EOL> '<STR_LIT>' : fnode . text , <EOL> '<STR_LIT:url>' : video_url_template % fnode . text , <EOL> '<STR_LIT>' : fnode . text . partition ( '<STR_LIT:->' ) [ <NUM_LIT:0> ] <EOL> } <EOL> for fnode in format_doc . findall ( '<STR_LIT>' ) <EOL> ] <EOL> return { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:id>' : video_id , <EOL> '<STR_LIT>' : formats , <EOL> '<STR_LIT:title>' : title , <EOL> '<STR_LIT:description>' : description , <EOL> '<STR_LIT>' : thumbnail , <EOL> } </s>
