@@ -0,0 +1,1322 @@
+'''%0ACreated on 2013-12-20%0A%0A@author: bn%0A'''%0A%0A# -*- coding: gbk -*-%0Aimport re%0A%0Atry: %0A    input = raw_input%0Aexcept NameError:%0A    pass%0A%0Atry:%0A    import urllib.request%0A    #import urllib.parse%0Aexcept ImportError:%0A    import urllib%0A    urllib.request = __import__('urllib2')%0A    urllib.parse = __import__('urlparse')%0A %0Aurlopen = urllib.request.urlopen%0Arequest = urllib.request.Request%0A%0Adef get_content_from_url(url):%0A    attempts = 0%0A    content = ''%0A%0A    while attempts %3C 5:%0A        try:%0A            content = urlopen(url).read().decode('utf-8', 'ignore')%0A            break%0A        except Exception as e:%0A            attempts += 1%0A            print(e)%0A%0A    return content%0A%0A    %0Adef download_from_aiciba(query, path):%0A    %22%22%22Download full size images from Bing image search.%0A %0A    Don't print or republish images without permission.%0A    I used this to train a learning algorithm.%0A    %22%22%22%0A    BASE_URL = 'http://www.aiciba.com/'+query%0A    content = get_content_from_url(BASE_URL)%0A    phonetic_list = re.findall(%0A            %22%5C%5B%3C/strong%3E%3Cstrong lang=%5C%22EN-US%5C%22 xml:lang=%5C%22EN-US%5C%22%3E(%5B%5E%3C%3E/%5D*)%3C/strong%3E%3Cstrong%3E%5C%5D%22, content, re.M %7C re.S)%0A    print(phonetic_list)%0A%0A    file = open(path, %22a%22)%0A    for item in phonetic_list:%0A        file.write(item.encode('utf-8')+'%5Cn')%0A    file.close()%0A %0Adownload_from_aiciba(%22person%22, %22phonetics.log%22)%0A

Add phonetics download from aiciba, can download more things from aiciba in future