Esempio n. 1
0
def get_keyword_items(iview_config, keyword):
	"""	This function fetches the programs for the featured videos
		which contain the items (i.e. the actual episodes).
	"""
	url = iview_config['api_url'] + ('keyword=%s' % keyword)
	index_data = fetch_url(url)
	return parser.parse_index(index_data)
Esempio n. 2
0
def get_programme(iview_config):
	"""	This function pulls in the index, which contains the TV series
		that are available to us. The index is possibly encrypted, so we
		must decrypt it here before passing it to the parser.
	"""
	url = iview_config['api_url'] + 'seriesIndex'
	index_data = fetch_url(url)
	programme = parser.parse_index(index_data)
	return programme
Esempio n. 3
0
def get_index():
	"""	This function pulls in the index, which contains the TV series
		that are available to us. The index is possibly encrypted, so we
		must decrypt it here before passing it to the parser.
	"""

	index_data = maybe_fetch(iview_config['api_url'] + 'seriesIndex')

	return parser.parse_index(index_data)
Esempio n. 4
0
def get_index():
	"""	This function pulls in the index, which contains the TV series
		that are available to us. The index is possibly encrypted, so we
		must decrypt it here before passing it to the parser.
	"""

	index_data = maybe_fetch(iview_config['api_url'] + 'seriesIndex')

	if config.use_encryption:
		r = rc4.RC4(config.index_password)
		# RC4 is bidirectional, no need to distinguish between 'encrypt'
		# and 'decrypt'.
		index_data = r.engine_crypt(r.hex_to_str(index_data))

	return parser.parse_index(index_data)
Esempio n. 5
0
def download_comic(url):
    res = open_url(url)
    if not res:
        raise Exception("open index url failure")
    section_list = parse_index(res, url)
    download_section(section_list[0])