def get_themes_wp():
    r = urllib2.Request("http://themes.svn.wordpress.org/")
    content = urllib2.urlopen(r)

    tree = html.fromstring(content.read())
    el_list = tree.find('body').find('ul').findall('li')
    themes = []
    for el in el_list:
        themes.append(el.text_content())

    with open("%s/wp_themes.txt.new" % CMS_EXPLORER_DIR, "w+") as file:
        for theme in themes:
            file.write("wp-content/themes/%s\n" % theme.encode('ascii','ignore'))
    print("WP themes list updated!")
dataset/ETHPy150Open owtf/owtf/scripts/update_cms_explorer_lists.py/get_themes_wp/original