Exemple #1
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('下一页</a><a href="http://android.d.cn/game/1/-1/-1/(.+?)/"', download_html, re.DOTALL|re.UNICODE)
     if found is None:
         found = re.search('下一页</a><a href="http://android.d.cn/software/1/-1/-1/(.+?)/"', download_html, re.DOTALL|re.UNICODE)
         appType = "2"
     else:
         appType = "1"
     try:
         os.makedirs('./Tinkerbell/downloads/dcn')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/dcn")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         new_download_url = self.download_url + str(i) + "/"
         _log("Downloading from %s" % new_download_url)
         filename, download_html = d._curl(new_download_url)
         found = re.findall('<div class="list-left">.*?<a href="(.+?)"', download_html, re.DOTALL)
         for download_url in found:
             print download_url
             if download_url.endswith(".html")==True and download_url.startswith(self.path):
                 appID = d._mid(download_url, self.path, ".html")
                 download_url = "http://android.d.cn/rm/red/" + appType + "/" + appID + "/"
                 filename, download_html = d._curl(download_url)
                 found = re.search('"pkgUrl":"(.+?)","', download_html, re.DOTALL)
                 _apk_link = found.group(1)
                 _download_name = os.path.basename(_apk_link)
                 _download_name = _download_name[:-8]
                 d._download_apk(_apk_link, _download_name)
     os.chdir('../../../')
Exemple #2
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('last"><a href="(.+?)" title="尾页', download_html, re.DOTALL)
     #_number_pages = d._mid(found.group(1), "/category/411/1_1_", "_1")
     number = found.group(1).split('_')
     _number_pages = number[2]
     try:
         os.makedirs('./Tinkerbell/downloads/appchina')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/appchina")
     for i in range(1, int(_number_pages)+1):
         download_url = self.download_url + str(i) + "_1_0_0_0.html"
         _log("Downloading from %s" %download_url)
         filename, download_html = d._curl(download_url)
         found = re.findall("更多详情</a>.*?<a href='(.+?)' class=", download_html, re.DOTALL)
         for _apk_link in found:
             filename = os.path.basename(_apk_link)
             _download_name = filename.split("?", 1)
             d._download_apk(_apk_link, _download_name[0])
     os.chdir('../../../')
Exemple #3
0
 def _download(self, path, download_url):
     self.path = path
     
     d = curl()
     filename, download_html = d._curl(self.path)
     _number_pages = re.search('yui3-appsview-page-ellipsis">.*?</span>.*?<a  title="第(.+?)页"', download_html, re.DOTALL)
     try:
         os.makedirs('./Tinkerbell/downloads/m163')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/m163")
     for i in range(1, int(_number_pages.group(1))+1):
         self.download_url = download_url + str(i) + ".html"
         filename, download_html = d._curl(self.download_url)
         _log("Downloading from %s" % unquote(self.download_url))
         found = re.findall('m-t5">.*?<a href="(.+?)"', download_html, re.DOTALL)
         for _apk_link in found:
             filename = os.path.basename(_apk_link)
             filename = re.findall('%2Ffile.m.163.com%2Fapp%2Ffree%2F.*?%2F.*?%2F(.+?).apk', filename, re.DOTALL)
             if len(filename)!=0:
                 _download_name = repr(unquote(filename[0])).replace('\'','')
                 _download_name = _download_name.replace('u\\','').replace('\\','')
                 _download_name = _download_name.split('/', 1)[-1] + ".apk"
                 d._download_apk(_apk_link,_download_name)
     os.chdir('../../../')
Exemple #4
0
 def _download(self, path, category, download_url):
     self.path = path
     self.category = category
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     szSearchString = '下一页</a><a href="http://www.mumayi.com/android/'+self.category+'/list_(.*?).html">末页</a>'
     found = re.search(szSearchString, download_html, re.DOTALL|re.UNICODE)
     _number_pages = found.group(1).split('_')
     
     try:
         os.makedirs('./Tinkerbell/downloads/mumayi')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/mumayi")
     
     #_log(int(_number_pages[1]))
     for i in range(1, int(_number_pages[1])+1):
         new_download_url = self.path + "/list_" + _number_pages[0] + "_" + str(i) + ".html"
         _log("[+] Downloading from %s" % new_download_url)
         filename, download_html = d._curl(new_download_url)
         
         found = re.findall('<i></i></a><a href="http://www.mumayi.com/android-(.*?).html" title="', download_html, re.DOTALL|re.UNICODE)
         for download_url in found:
             #_log("[+] Downloading from %s.html" % download_url)
             app_url = "http://www.mumayi.com/android-" + download_url + ".html"
             filename, download_html = d._curl(app_url)
             found = re.search('iappname hidden fl" >(.*?) </h1>', download_html, re.DOTALL)
             _apk_link = "http://down.mumayi.com/" + download_url
             _download_name = "unsure.apk"
             d._download_tgbus_apk(_apk_link, _download_name)
     os.chdir('../../../')
Exemple #5
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('p=2">&gt;</a></li><li><a href="/apk/\?p=(.+?)">最末页', download_html, re.DOTALL)
     if found is None:
         found = re.search('p=2">&gt;</a></li><li><a href="/game/\?p=(.+?)">最末页', download_html, re.DOTALL)
     try:
         os.makedirs('./Tinkerbell/downloads/coolapk')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/coolapk")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         new_download_url = self.download_url + str(i)
         _log("[+] Downloading from %s" % new_download_url)
         filename, download_html = d._curl(new_download_url)
         found = re.findall('<h4 class="media-heading"><a href="(.+?)"', download_html, re.DOTALL)
         for download_url in found:
             if download_url.endswith("/")==False:
                 download_url = "http://coolapk.com" + download_url
                 _log("[+] Downloading from %s" % download_url)
                 filename, download_html = d._curl(download_url)
                 found = re.search('var apkDownloadUrl = "(.+?)";', download_html, re.DOTALL)
                 _apk_link = found.group(1)
                 _download_name = d._mid(_apk_link, "/dl?pn=","&v=") + ".apk"
                 _apk_link = "http://coolapk.com" + _apk_link #+ '&extra=0:'
                 print _apk_link
                 d._download_coolapk(_apk_link, download_url, _download_name)
     os.chdir('../../../')
Exemple #6
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('下页</a><a href="http://a.tgbus.com/soft/(.+?)/"', download_html, re.DOTALL)
     if found is None:
         found = re.search('下页</a><a href="http://a.tgbus.com/game/(.+?)/"', download_html, re.DOTALL)
     try:
         os.makedirs('./Tinkerbell/downloads/tgbus')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/tgbus")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         new_download_url = self.download_url + str(i) + "/"
         _log("[+] Downloading from %s" % new_download_url)
         filename, download_html = d._curl(new_download_url)
         found = re.findall('<b><a href="http://a.tgbus.com/soft/item-(.+?)/"', download_html, re.DOTALL)
         for download_url in found:
             download_url_link = "http://a.tgbus.com/soft/item-" + download_url
             _log("[+] Downloading from %s" % download_url_link)
             filename, download_html = d._curl(download_url_link)
             query = 'http://a.tgbus.com/download/' + download_url + '/(.+?)" target="_blank" title="'
             found = re.search(query, download_html, re.DOTALL)
             _apk_link = 'http://a.tgbus.com/download/' + download_url + "/" + found.group(1)
             found = re.search('您当前正在:<b>(.+?)</b></div>', download_html, re.DOTALL)
             _download_name = download_url + ".apk"
             d._download_apk(_apk_link, _download_name)
     os.chdir('../../../')
Exemple #7
0
    def _download(self, path, download_url):
        self.path = path
        self.download_url = download_url

        d = curl()
        filename, download_html = d._curl(self.path)
        found = re.findall(
            '<li class="dis_writebg_a"><a href="/category/(.+?).html">', download_html, re.DOTALL | re.UNICODE
        )
        _num = found[6][4:]
        # _number_pages = d._mid(found.group(1), "/category/411/1_1_", "_1")
        number = _num.split("_")
        _number_pages = number[0]
        try:
            os.makedirs("./Tinkerbell/downloads/appchina")
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/appchina")
        for i in range(1, int(_number_pages) + 1):
            download_url = self.download_url + str(i) + "_1_1_3_0_0_0.html"
            _log("Downloading from %s" % download_url)
            filename, download_html = d._curl(download_url)
            found = re.findall('查看详情</a>.*?<a href="(.+?)" class=', download_html, re.DOTALL | re.UNICODE)
            name_found = re.findall('meta-packagename="(.+?)" meta-appid=', download_html, re.DOTALL | re.UNICODE)
            for _apk_link, _download_name in zip(found, name_found):
                _download_name = _download_name + ".apk"
                d._download_appchinaapk(_apk_link, _download_name)
        os.chdir("../../../")
Exemple #8
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     try:
         os.makedirs('./Tinkerbell/downloads/aptoide')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/aptoide")
     for offset in xrange(30,3000,30):
         values = {'type' : 'latest', 
                   'mature' : '0',
                   'offset' : offset }
         data = urllib.urlencode(values)
         req = urllib2.Request(self.path, data)
         response = urllib2.urlopen(req)
         download_html = response.read()
         if download_html:
             found = re.findall('<a class="item app" href="(.*?)">', download_html, re.DOTALL|re.UNICODE)
             for download_url in found:
                 _log("[+] Downloading from %s" % download_url)
                 szTokenize = download_url.split('/')
                 _apkID = szTokenize[len(szTokenize)-2]
                 download_url = "https://www.aptoide.com/webservices/2/getApkInfo/id:" + _apkID + "/json"
                 _log("[+] JSON file found in %s" % download_url)
                 filename, download_html = d._curl(download_url)
                 found = re.search('","path":"(.*?)","', download_html, re.DOTALL|re.UNICODE)
                 _apk_link = found.group(1)
                 szTokenize = _apk_link.split('/')
                 _download_name = szTokenize[len(szTokenize)-1]
                 d._download_apk(_apk_link, _download_name)
     os.chdir('../../../')
Exemple #9
0
 def _download(self, path, download_url):
     self.path = path
     
     d = curl()
     filename, download_html = d._curl(self.path)
     _number_pages = re.findall('\.\.\.</a><a href=\'index_(.*?).shtml\'>', download_html, re.DOTALL|re.UNICODE)
     _number_pages = int(_number_pages[0])
     
     try:
         os.makedirs('./Tinkerbell/downloads/liqucn')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/liqucn")
     for i in range(_number_pages, 0, -1):
         page_url = "http://os-android.liqucn.com/rj/index_" + str(i) + ".shtml"
         filename, download_html = d._curl(page_url)
         _log("[+] Downloading from %s" % unquote(page_url))
         #found = re.findall('<li>[\r\n].*?<a href="http://os-android.liqucn.com/rj/(.*?).shtml"  class="pic" target="_blank"', download_html, re.DOTALL|re.UNICODE)
         found = re.findall('<li>\r\n            <a href="/rj/(.*?).shtml" class="pic" target="_blank">', download_html, re.DOTALL|re.UNICODE)
         for _link_num in found:
             _app_link = "http://os-android.liqucn.com/rj/" + _link_num + ".shtml"
             filename, download_html = d._curl(_app_link)
             found = re.search('高速下载</a></li>\r\n					     <li><a href="(.*?)" class="btn_normal"', download_html, re.DOTALL|re.UNICODE)
             if found is None:
                 print("[*] %s probably contained an invalid page." % _app_link)
             else:
                 _download_name = "unsure.apk"
                 _apk_link = found.group(1)
                 d._download_tgbus_apk(_apk_link, _download_name)
     os.chdir('../../../')
     
Exemple #10
0
 def _download(self, path, category, download_url):
     self.path = path
     self.category = category
     self.download_url = download_url
     
     d = curl()
     location = self.path + self.category + "/"
     filename, download_html = d._curl(location)
     szSearch = '"nav_ext">...</span> <a href="'+self.path+ self.category+'/page/(.*?)/">.*?</a></span> <span class="nnext">'
     _number_pages = re.search(szSearch, download_html, re.DOTALL|re.UNICODE)
     _number_pages = int(_number_pages.group(1))
     try:
         os.makedirs('./Tinkerbell/downloads/androidappru')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/androidappru")
     for i in range(1, _number_pages+1):
         page_url = location + "page/" + str(i) + "/"
         filename, download_html = d._curl(page_url)
         _log("[+] Downloading from %s" % unquote(page_url))
         found = re.findall('class="argmore"><a href="(.*?)"><b>', download_html, re.DOTALL|re.UNICODE)
         for _link_num in found:
             _log("[+] Retrieving .apk link from %s" % _link_num)
             filename, download_html = d._curl(_link_num)
             found = re.search('class="attachment"><a href="(.*?)" >', download_html, re.DOTALL|re.UNICODE)
             _download_name = re.search('class="attachment"><a href=".*?" >(.*?)</a> \[', download_html, re.DOTALL|re.UNICODE)
             _download_name = _download_name.group(1)
             if found is None:
                 print("[*] %s probably contained an invalid page." % _app_link)
             else:
                 _log("[+] Downloading from %s" % found.group(1))
                 _apk_link = found.group(1)
                 d._download_appchinaapk(_apk_link, _download_name)
     os.chdir('../../../')
     
Exemple #11
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     
     found = re.search('总共:(.*?)</span>', download_html, re.DOTALL|re.UNICODE)
     try:
         os.makedirs('./Tinkerbell/downloads/mm10086cn')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/mm10086cn")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         for j in range(1,3):
             page_url = path + '&p=' + str(i) + '&screen=' + str(j)
             _log("[+] Scraping from %s" % page_url)
             filename, download_html = d._curl(page_url)
             found = re.findall('href="/download/android/(.*?)" target="', download_html, re.DOTALL|re.UNICODE)
             print(len(found))
             for new_download_url in found:
                 _apk_link = "http://mm.10086.cn/download/android/" + new_download_url
                 _download_name = "unsure.apk"
                 _log("[+] Downloading from %s" % _apk_link)
                 d._download_tgbus_apk(_apk_link, _download_name)
     os.chdir('../../../')
Exemple #12
0
    def _download(self, path, download_url):
        self.path = path
        self.download_url = download_url

        d = curl()
        filename, download_html = d._curl(self.path)
        found = re.search('last"><a href="(.+?)" title="尾页', download_html,
                          re.DOTALL)
        #_number_pages = d._mid(found.group(1), "/category/411/1_1_", "_1")
        number = found.group(1).split('_')
        _number_pages = number[2]
        try:
            os.makedirs('./Tinkerbell/downloads/appchina')
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/appchina")
        for i in range(1, int(_number_pages) + 1):
            download_url = self.download_url + str(i) + "_1_0_0_0.html"
            _log("Downloading from %s" % download_url)
            filename, download_html = d._curl(download_url)
            found = re.findall("更多详情</a>.*?<a href='(.+?)' class=",
                               download_html, re.DOTALL)
            for _apk_link in found:
                filename = os.path.basename(_apk_link)
                _download_name = filename.split("?", 1)
                d._download_apk(_apk_link, _download_name[0])
        os.chdir('../../../')
Exemple #13
0
    def _download(self, path, download_url):
        self.path = path

        d = curl()
        filename, download_html = d._curl(self.path)
        found = re.search('data-total=(.*?) data-pn=0', download_html,
                          re.DOTALL | re.UNICODE)
        try:
            os.makedirs('./Tinkerbell/downloads/baidu')
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/baidu")
        _number_pages = found.group(1)
        for i in range(1, int(_number_pages) + 1):
            self.download_url = self.path + "&page_num=" + str(i)
            _log("Downloading from %s" % self.download_url)
            filename, download_html = d._curl(self.download_url)
            _download_links = re.findall('data_url="(.+?)"', download_html,
                                         re.DOTALL)
            _data_package = re.findall('data_package="(.+?)"', download_html,
                                       re.DOTALL)
            _data_versionname = re.findall('data_versionname="(.+?)"',
                                           download_html, re.DOTALL)
            for i in range(len(_download_links)):
                _download_name = _data_package[i] + "." + _data_versionname[
                    i] + ".apk"
                d._download_apk(_download_links[i], _download_name)
        os.chdir('../../../')
Exemple #14
0
    def _download(self, path, download_url):
        self.path = path
        self.download_url = download_url

        d = curl()
        try:
            os.makedirs('./Tinkerbell/downloads/slideme')
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/slideme")
        for i in range(1, 9248141):
            download_url = self.path + "sam6.apk?adl=" + str(i)
            d._download_apk(download_url, i)
        os.chdir('../../../')
Exemple #15
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     try:
         os.makedirs('./Tinkerbell/downloads/slideme')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/slideme")
     for i in range(1, 9248141):
         download_url = self.path + "sam6.apk?adl=" + str(i)
         d._download_apk(download_url, i)
     os.chdir('../../../')
Exemple #16
0
    def _download(self, path, download_url):
        self.path = path
        self.download_url = download_url

        d = curl()
        filename, download_html = d._curl(self.path)
        found = re.search(
            '下一页</a></li>.*?<li class="pre"><a href="/apps_7_1_(.*?).html" title="',
            download_html, re.DOTALL | re.UNICODE)
        if found is None:
            found = re.search(
                '下一页</a></li>.*?<li class="pre"><a href="/games_8_1_(.*?).html" title="',
                download_html, re.DOTALL | re.UNICODE)
            appType = "2"
        else:
            appType = "1"
        try:
            os.makedirs('./Tinkerbell/downloads/gfan')
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/gfan")
        _number_pages = found.group(1)
        for i in range(1, int(_number_pages) + 1):
            new_download_url = self.download_url + "_1_" + str(i) + ".html"
            _log("Downloading from %s" % new_download_url)
            filename, download_html = d._curl(new_download_url)
            found = re.findall('apphot-tit"> <a href="(.+?)"', download_html,
                               re.DOTALL)
            for download_url in found:
                if download_url.endswith(".html") == True:
                    download_url = "http://apk.gfan.com" + download_url
                    filename, download_html = d._curl(download_url)
                    found = re.search(
                        'http://api.gfan.com/market/api/apk\?(.+?)"',
                        download_html, re.DOTALL | re.UNICODE)
                    _apk_link = found.group(1)
                    _apk_link = "http://api.gfan.com/market/api/apk?" + _apk_link
                    found = re.search('<h4 class="curr-tit">(.+?)</h4>',
                                      download_html, re.DOTALL | re.UNICODE)
                    _download_name = repr(
                        found.group(1).decode('utf-8')).replace('\'',
                                                                '') + ".apk"
                    _download_name = _download_name.replace('u\\', '').replace(
                        '\\', '')
                    filename, download_html = d._curl(_apk_link)
                    d._download_apk(_apk_link, _download_name)
        os.chdir('../../../')
Exemple #17
0
    def _download(self, path, download_url):
        self.path = path
        self.download_url = download_url

        d = curl()
        filename, download_html = d._curl(self.path)
        found = re.search(
            '下一页</a><a href="http://android.d.cn/game/1/-1/-1/(.+?)/"',
            download_html, re.DOTALL | re.UNICODE)
        if found is None:
            found = re.search(
                '下一页</a><a href="http://android.d.cn/software/1/-1/-1/(.+?)/"',
                download_html, re.DOTALL | re.UNICODE)
            appType = "2"
        else:
            appType = "1"
        try:
            os.makedirs('./Tinkerbell/downloads/dcn')
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/dcn")
        _number_pages = found.group(1)
        for i in range(1, int(_number_pages) + 1):
            new_download_url = self.download_url + str(i) + "/"
            _log("Downloading from %s" % new_download_url)
            filename, download_html = d._curl(new_download_url)
            found = re.findall('<div class="list-left">.*?<a href="(.+?)"',
                               download_html, re.DOTALL)
            for download_url in found:
                print download_url
                if download_url.endswith(
                        ".html") == True and download_url.startswith(
                            self.path):
                    appID = d._mid(download_url, self.path, ".html")
                    #http://android.d.cn/rm/red/2/407/
                    download_url = "http://android.d.cn/rm/red/" + appType + "/" + appID + "/"
                    filename, download_html = d._curl(download_url)
                    found = re.search('"pkgUrl":"(.+?)","', download_html,
                                      re.DOTALL)
                    _apk_link = found.group(1)
                    _download_name = os.path.basename(_apk_link)
                    _download_name = _download_name[:-8]
                    d._download_apk(_apk_link, _download_name)
        os.chdir('../../../')
Exemple #18
0
 def _download(self, path, download_url):
     self.path = path
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('data-total=(.*?) data-pn=0', download_html, re.DOTALL|re.UNICODE)
     try:
         os.makedirs('./Tinkerbell/downloads/baidu')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/baidu")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         self.download_url = self.path + "&page_num=" +str(i)
         _log("Downloading from %s" %self.download_url)
         filename, download_html = d._curl(self.download_url)
         found = re.findall('data_url="(.+?)"', download_html, re.DOTALL)
         for _apk_link in found:
             _download_name = os.path.basename(_apk_link.split('/', 1)[-1])
             d._download_apk(_apk_link, _download_name)
     os.chdir('../../../')
Exemple #19
0
    def _download(self, path, download_url):
        self.path = path
        self.download_url = download_url

        d = curl()
        filename, download_html = d._curl(self.path)
        found = re.search('p=2">&gt;</a></li><li><a href="/apk/\?p=(.+?)">最末页',
                          download_html, re.DOTALL)
        if found is None:
            found = re.search(
                'p=2">&gt;</a></li><li><a href="/game/\?p=(.+?)">最末页',
                download_html, re.DOTALL)
        try:
            os.makedirs('./Tinkerbell/downloads/coolapk')
        except OSError:
            pass
        os.chdir("./Tinkerbell/downloads/coolapk")
        _number_pages = found.group(1)
        print _number_pages
        for i in range(1, int(_number_pages) + 1):
            new_download_url = self.download_url + str(i)
            _log("[+] Downloading from %s" % new_download_url)
            filename, download_html = d._curl(new_download_url)
            found = re.findall('<h4 class="media-heading"><a href="(.+?)"',
                               download_html, re.DOTALL)
            for download_url in found:
                if download_url.endswith("/") == False:
                    download_url = "http://coolapk.com" + download_url
                    _log("[+] Downloading from %s" % download_url)
                    filename, download_html = d._curl(download_url)
                    found = re.search('var apkDownloadUrl = "(.+?)";',
                                      download_html, re.DOTALL)
                    _apk_link = found.group(1)
                    _download_name = d._mid(_apk_link, "/dl?pn=",
                                            "&v=") + ".apk"
                    _apk_link = "http://coolapk.com" + _apk_link + '&extra=0:'
                    print("_apk_link: %s" % _apk_link)
                    d._download_coolapk(_apk_link, _apk_link, _download_name)
        os.chdir('../../../')
Exemple #20
0
 def _download(self, path, download_url):
     self.path = path
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('data-total=(.*?) data-pn=0', download_html, re.DOTALL|re.UNICODE)
     try:
         os.makedirs('./Tinkerbell/downloads/baidu')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/baidu")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         self.download_url = self.path + "&page_num=" +str(i)
         _log("Downloading from %s" %self.download_url)
         filename, download_html = d._curl(self.download_url)
         _download_links = re.findall('data_url="(.+?)"', download_html, re.DOTALL)
         _data_package = re.findall('data_package="(.+?)"', download_html, re.DOTALL)
         _data_versionname = re.findall('data_versionname="(.+?)"', download_html, re.DOTALL)
         for i in range(len(_download_links)):
             _download_name = _data_package[i] + "." + _data_versionname[i] + ".apk"
             d._download_apk(_download_links[i], _download_name)
     os.chdir('../../../')
Exemple #21
0
 def _download(self, path, download_url):
     self.path = path
     self.download_url = download_url
     
     d = curl()
     filename, download_html = d._curl(self.path)
     found = re.search('下一页</a></li>.*?<li class="pre"><a href="/apps_7_1_(.*?).html" title="', download_html, re.DOTALL|re.UNICODE)
     if found is None:
         found = re.search('下一页</a></li>.*?<li class="pre"><a href="/games_8_1_(.*?).html" title="', download_html, re.DOTALL|re.UNICODE)
         appType = "2"
     else:
         appType = "1"
     try:
         os.makedirs('./Tinkerbell/downloads/gfan')
     except OSError:
         pass
     os.chdir("./Tinkerbell/downloads/gfan")
     _number_pages = found.group(1)
     for i in range(1, int(_number_pages)+1):
         new_download_url = self.download_url + "_1_" + str(i) + ".html"
         _log("Downloading from %s" % new_download_url)
         filename, download_html = d._curl(new_download_url)
         found = re.findall('apphot-tit"> <a href="(.+?)"', download_html, re.DOTALL)
         for download_url in found:
             if download_url.endswith(".html")==True:
                 download_url = "http://apk.gfan.com" + download_url
                 filename, download_html = d._curl(download_url)
                 found = re.search('http://api.gfan.com/market/api/apk\?(.+?)"', download_html, re.DOTALL|re.UNICODE)
                 _apk_link = found.group(1)
                 _apk_link = "http://api.gfan.com/market/api/apk?" + _apk_link                    
                 found = re.search('<h4 class="curr-tit">(.+?)</h4>', download_html, re.DOTALL|re.UNICODE)
                 _download_name = found.group(1)
                 version = re.search('<p>版 本 号:(.+?)</p>', download_html, re.DOTALL|re.UNICODE)
                 _download_name = _download_name+"."+version.group(1)+".apk"
                 filename, download_html = d._curl(_apk_link)
                 d._download_gfan_apk(_apk_link, _download_name)
     os.chdir('../../../')