def get_wav_link():
    fp = just_post_via_mechanize.main()
    doc = lxml.html.parse(fp).getroot()
    link_targets = [link.attrib.get('href', '') for link in doc.cssselect('a')]
    wav_links = [target for target in link_targets if 'wav' in target]
    return wav_links[0]
def get_relative_wav_link():
    fp = just_post_via_mechanize.main()
    as_string = fp.read()
    wav_link = stupid_string_parse.parse(as_string)
    return wav_link
예제 #3
0
def get_relative_wav_link():
    fp = just_post_via_mechanize.main()
    as_string = fp.read()
    wav_link = stupid_string_parse.parse(as_string)
    return wav_link
def get_wav_link():
    fp = just_post_via_mechanize.main()
    doc = lxml.html.parse(fp).getroot()
    link_targets = [link.attrib.get('href', '') for link in doc.cssselect('a')]
    wav_links = [target for target in link_targets if 'wav' in target]
    return wav_links[0]