get app name from GP or itunes

var superagent = require('superagent');
var cheerio = require('cheerio')
var items = []; //androidarr = ["com.cleanmaster.security", "com.outfit7.mytalkingtomfree", "com.cleanmaster.mguard", "com.jrzheng.supervpnfree", "com.outfit7.mytalkingangelafree", "com.grindrapp.android", "devian.tubemate.home", "com.freevpnintouch", "com.gameloft.android.ANMP.GloftA8HM", "gtagame.mobilesix", "com.zeptolab.ctr.ads", "com.mxtech.videoplayer.ad", "com.recax.mjclub", "com.protey.doors_puzzle_box", "com.ltgms.play", "com.skout.android", "mobi.ifunny", "com.aottanks.thegrandauto", "com.utorrent.client", "com.ijinshan.kbatterydoctor_en"]
androidarr = ["actiongames.games.cbb" ,"xxx" ,"air.SchoolPublic" ,"air.SuperCity" ,"at.ner.lepsWorld2" ,"at.ner.lepsWorld3Plus" ,"BM" ,"cf2b7bd5bd060fd8fee8c94a662fcb28" ,"club.batterywatch" ,"clump.fourd.activity" ,"cn.rtfsc.searchmanga" ,"com.andrewshu.android.reddit" ,"com.apalon.myclock" ,"com.askfm" ,"com.azaze.doodleart" ,"com.bbm" ,"com.bestcoolfungames.antsmasher" ,"com.bittorrent.client" ,"com.calfordcn.gu" ,"com.callapp.contacts" ,"com.cleanmaster.mguard" ,"com.cleanmaster.security" ,"com.craftgames.worldcrft" ,"com.crazygame.inputmethod.keyboard7" ,"com.crazystudio.emoji.kitkat" ,"com.digitalchemy.calculator.freedecimal" ,"com.droidworld.learninggames" ,"com.fileclj.manager" ,"com.fingersoft.hillclimb" ,"com.firsttouchgames.dlsa" ,"com.fmarzana.vdlfree2" ,"com.forshared" ,"com.fundevs.app.mediaconverter" ,"com.funfreegames.namethepinoycelebrityquiz" ,"com.game.BubbleShooter" ,"com.game.JewelsStar" ,"com.gameloft.android.ANMP.GloftA8HM" ,"com.gameloft.android.ANMP.GloftGGHM" ,"com.gameloft.android.ANMP.GloftHOHM" ,"com.gameloft.android.ANMP.GloftM5HM" ,"com.grindrapp.android" ,"com.handmark.tweetcaster" ,"com.hapogames.BubbleParadise" ,"com.hi5.app" ,"com.HomeNetGames.ZombieDefense" ,"com.hornet.android" ,"com.ijinshan.kbatterydoctor_en" ,"com.indigokids.mashakasha" ,"com.ismaker.android.simsimi" ,"com.jakyl.sscfree" ,"com.ketchapp.donttouchthespikes" ,"com.kokteyl.goal" ,"com.leo.appmaster" ,"com.leopoldoapps.stfree" ,"com.maildroid" ,"com.movietime.tv" ,"com.musachapps.vdlfree" ,"com.mxtech.videoplayer.ad" ,"com.myyearbook.m" ,"com.notabasement.mangarock.android.lotus" ,"com.notabasement.mangarock.android.titan" ,"com.outfit7.mytalkingangelafree" ,"com.outfit7.mytalkingtomfree" ,"com.outfit7.talkingangelafree" ,"com.outfit7.talkingben" ,"com.outfit7.talkinggingerfree" ,"com.outfit7.talkingtom2free" ,"com.outfit7.tomlovesangelafree" ,"com.picsart.studio" ,"com.playrix.township" ,"com.qihoo.security" ,"com.roidapp.photogrid" ,"com.rovio.angrybirds" ,"com.rovio.angrybirdsrio" ,"com.sgiggle.production" ,"com.skout.android" ,"com.springwalk.mediaconverter" ,"com.surpax.ledflashlight.panel" ,"com.TinyLabProductions.FunKidRacing" ,"com.tinylabproductions.motocross" ,"com.utorrent.client" ,"com.VinAlex.Realcops" ,"com.wavestudio.theme.whiteblue" ,"com.weheartit" ,"com.witskies.w_manager" ,"com.wVideoDownloaderAppp" ,"com.zeptolab.ctr.ads" ,"com.zhiliaoapp.musically" ,"com.zynga.wwf2.free" ,"Compass" ,"de.lotum.whatsinthefoto.fr" ,"devian.tubemate.home" ,"flvto.com.flvto" ,"HNVideoGames" ,"com.movietime.tv" ,"tubemate.net" ,"www.adbuddiz.com" ,"m.sanook.com" ,"mobi.ifunny" ,"net.zedge.android" ,"org.khmertv" ,"pc.videoplayer.free" ,"phonemaster_bfbf_HD171" ,"sm.musicplayer.free" ,"tg.farmfruitvillage" ,"tubemate.net" ,"tunein.player" ,"wp.wattpad" ,"www.gothamads.com"] function getPage ( appbundle , index ){ //appbundle = 'com.tubemote.app'
path = "https://play.google.com/store/apps/details?id="+appbundle //com.cleanmaster.security
superagent.get( path)
.set('method', 'GET')
.set('path', '/store/apps/details?id='+appbundle )
.set('scheme', 'https')
.set('accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8')
.set('accept-language', 'zh-CN,zh;q=0.8')
.set('cache-control', 'cache-control')
.set('cookie' , 'SID=yANmlt1-wa2iOZ0xpo91fTq3kCpIGJDbh6yIS6zjD-Hg1KEwLlxRgx8jJFgtRa-hfXiDew.; HSID=AtFKBI8v6bEl1xZCW; SSID=AeYN_Q6OzqW7uTif8; APISID=XchY3tEkvTuawefq/AWtAbkz6zQ0TAIMqT; SAPISID=M0X-ircbnh58cwrC/AYYo9edaI4Sp8zQWv; PLAY_ACTIVE_ACCOUNT=ICrt_XL61NBE_S0rhk8RpG0k65e0XwQVdDlvB6kxiQ8=xxx@gmail.com; S=billing-ui-v3=UD_Up0_HrsW0vMLXPldD_Sfdeg6aLLCV:billing-ui-v3-efe=UD_Up0_HrsW0vMLXPldD_Sfdeg6aLLCV; NID=88=QGvCaJHEDH8l--Xe6yn37dJ_QFOCJC4NrGebHSXajdjptYQ7VBjnPNUCHeDSTo_Bv3tQp5JpGZMKdLtNEIS_e9IMaWVWxYkkQ6vAKmrNJerBnah5cuFGnpX0AcXjFPvfyqVawxHlDtY1pt_j-W2gOXC21oALG72JEQqmqaYjb9CR_0lTuYWdN7a_MZ65xsbg9z_t12F0fXD22f5d0u8hsTnMNCwqcmb7653vI2yQbahkXfXeDBiSdIFOjor-Afs8oCdqzLxl7DiM; PLAY_PREFS=CrAGCOasxvb6DhKmBgoCVVMQ07mMnfsqGucFEhMUFRjxAa8CxATjBeUF6AXXBpCVgQaRlYEGkpWBBpWVgQaXlYEGpJWBBreVgQa4lYEGvJWBBr2VgQbAlYEGwZWBBsSVgQbFlYEGyJWBBsmVgQbOlYEGz5WBBtCVgQbUlYEG2ZWBBt6VgQbylYEG-JWBBvqVgQaFloEGiJaBBouWgQaNloEGkJaBBpuWgQaeloEGn5aBBqCWgQahloEGppaBBqeWgQaoloEGypeBBu6XgQbvl4EGhZiBBoaYgQa2mIEGvpiBBq2bgQbLm4EGvJ2BBt2dgQbenYEG552BBpCegQaWnoEGpKCBBuKigQbzooEG_KKBBoujgQaapIEGnqSBBrKkgQavpYEG6qWBBp2mgQbGpoEG1KaBBtWmgQbWpoEG_qaBBoCngQaCp4EGhKeBBoangQaIp4EGiqeBBqOogQbEqIEG8qiBBvSogQajqYEGvKyBBsutgQbaroEG266BBtyugQbWr4EGwbCBBqSxgQalsYEGh7KBBomygQarsoEG1rKBBrG0gQa_uYEG1rmBBuu6gQaOwIEGosCBBsDAgQbtwIEG8sCBBoTBgQbBwYEGrsKBBrDCgQbWwoEGjMWBBo_FgQbKxoEGy8aBBrHHgQb4x4EGrcmBBrDJgQaeyoEGqsqBBuHKgQbryoEG3MyBBuTMgQbdzYEGhs6BBqHPgQbFz4EGxNKBBqrXgQaT2YEGy9mBBszZgQbU24EG596BBtfggQaD5IEGi-WBBozlgQaX5YEGuOWBBvHtgQbz7YEG_e2BBovvgQbG74EGk_CBBr3wgQaL8YEG2fWBBvD2gQa6-4EG0_6BBrD_gQbD_4EGxf-BBsf_gQbJ_4EGsISCBsiEggbJhIIGtYaCBqaHgganh4IGt4eCBriHggbah4IG7IeCBu2Hggbvh4IGv42CBuuNggaVjoIGl46CBsuRggbTkYIG2JGCBsyXggaImIIGqJmCBsGZggbvmYIGmZqCBprw4jsoo76fm_sqOiQ2MTYxNWM5ZS1iYTY1LTRlN2MtODliMC0yNTgzM2EyY2ZhNjhAAUgA:S:ANO1ljI2BQXmfMe5LQ; _ga=GA1.3.1189143683.1476070627; _gat=1')
.set('user-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36')
.end( function(err, sres){
if(err){
// console.log( appbundle)
return
}
var $ = cheerio.load(sres.text);
var appname = $(".id-app-title").text()
items.push ({
"appbundle": appbundle,
"appname": appname
}); console.log( index , " ", appbundle , " ", appname) }) } iosItems = []
function getIosAppName( iosbundle ,index ) {
//for(var i =0 ; i < 100000; i ++ ) { }
var a = index
//如果是字母开头的就不再请求
reg = /^[a-z]/ if ( reg.test(iosbundle) ) {
// iosItems.push ( { "bunle" : iosbundle , "ios-name" : "null " } )
  console.log( a , " ", iosbundle , " ", "null")
}else {
path = "https://itunes.apple.com/app/id" + iosbundle + ""
superagent.get( path)
.set('method', 'GET')
.set('scheme', 'https')
.set('accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8')
.set('accept-language', 'zh-CN,zh;q=0.8')
.set('cache-control', 'cache-control')
.set('cookie' , 'xp_ci=3z2m0V8cz9D3z4q8zD4vzD0mdmHFr; a=QQAJAAAACwA2aJ0GMTFsTHBJAAAAADfS1EE=; s_cc=true')
.set('user-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36')
.end( function(err, sres){
if(err){
//console.log("err is :", sres.status , " ======> " , iosbundle)
//console.log( a , " ", iosbundle , " ", "not found ")
}
var $ = cheerio.load(sres.text);
var appname = $('div.left>h1').text()
iosItems.push ({
"appbundle": iosbundle,
"appname": appname
});
// console.log( a++ )
  console.log( a , " ", iosbundle , " ", appname)
});
}} //iosarr = ["834878585", "com.zplay.popstar", "657500465", "com.xunxin.doudizu", "749118884" , "909351158", "com.xunxin.popstarv", "com.gameloft.asphalt8", "934792851", "610391947", "439873467", "421998342", "882307119", "693874918", "623158699", "com.gameloft.ModernCombat5", "com.liaolong.yunzhongshuge", "com.zl.health", "com.zhongsou.huwaijianshen1", "com.zhongsou.hycpshzjAppStore", "962766004", "571393580", "531323947", "com.gameloft.gangstar4", "com.gameloft.ZooRescueGL", "com.haodou.cookbook", "724816878", "com.gameloft.dragonmaniahd", "619175115", "749124884", "421997825", "com.gameloft.realfootball2012", "com.gagediell.GageDiell", "350426804", "com.wenli.ChildStory", "com.wenli.Trafical", "com.gameloft.gtr2", "com.xunxin.sudoku", "443932954", "589113075", "com.zplay.popstar.xy", "368504562", "554936514", "com.nimasabi.1biduzihui", "com.gameloft.mcfw", "355218949", "441903971", "1000548274", "308956623", "529141346", "509458284", "564540143", "579188627", "866132884", "1025462912", "com.gameloft.nova3ads", "648668184", "380248105", "1146128499", "480204135", "518313894", "343200656", "703327328", "381471023", "804641004", "749083919", "com.gameloft.blitz", "1080930585", "537112539", "656176278", "888786749", "906364548", "1064910141", "722120997", "888963581", "396301854", "923268741", "447331712", "com.zplay.yanxiaoyu", "300048137", "com.gameloft.heroesoc", "429610587", "1024505111", "977247771", "302324249", "573166436", "1093108529", "780172278", "804379658", "418987775", "1027688889", "526641427", "386519388", "com.xmobileapp.meishijie", "com.zongyi.popstar2", "580175049", "945975965", "com.gameloft.Jousting", "882537136", "434781441", "com.musachapps.vdlfree", "587366035", "416345319", "com.zongyi.tuhaoxing", "994884811", "749046891", "852801667", "694578768"]
iosarr = ["302324249", "306310789", "308956623", "319881193", "350426804", "355218949", "370603801", "386519388", "400169658", "418987775", "439873467", "519675128", "522314360", "566564331", "571393580", "583401091", "596328120", "597986893", "610391947", "635896473", "648668184", "657500465", "669627260", "689878287", "724816878", "749046891", "749118884", "749124884", "804379658", "804641004", "882537136", "887422562", "898631260", "903751102", "906364548", "909351158", "967926147", "967976403", "977247771", "978866413", "1072100506", "1074967151", "1082635984", "1093108529", "1139995553"] a = 0
//iosarr.forEach(function( app) {
//setTimeout(getIosAppName(app) , 200);
// a = a +1
// getIosAppName( app , a )
//}) androidarr.forEach(function( app) {
a = a+1
getPage(app , a )
})

get android or ios appname的更多相关文章

  1. weexpack 创建项目, 打包Android 和 ios

    1: 首先确保 node.js版本大于6.0, 不然使用 weexpack 时会报错(部分使用es6语言,node版本太低不支持es6) 下面所有都是命令行执行的命令 2: 全局安装 weexpack ...

  2. JS调用Android、Ios原生控件

    在上一篇博客中已经和大家聊了,关于JS与Android.Ios原生控件之间相互通信的详细代码实现,今天我们一起聊一下JS调用Android.Ios通信的相同点和不同点,以便帮助我们在进行混合式开发时, ...

  3. 现在创业做App,先做 Android 还是 iOS?

    随着互联网+的高速发展,现在创业大部分都是在布局移动端,初期往往摆在面前最大的难题是,如何分配有限的成本,在最快的速度内占领市场?这个大难题会影响创始人在团队和产品建设方方面面的决定.缩小至移动App ...

  4. 判断手机端用户打开页面时是android还是ios,并将判断结果通过ajax返回给url接口,传递回去

    首先判断页面是android还是ios,然后利用ajax将结果通过接口url返回回去,记录到log日志中,以统计android和ios用户访问该页面的数量(数据统计) <script type= ...

  5. Xamarin For Visual Studio 3.0.54.0 完整离线破解版(C# 开发Android、IOS工具 吾乐吧软件站分享)

    Xamarin For Visual Studio就是原本的Xamarin For Android 以及 Xamarin For iOS,最新版的已经把两个独立的插件合并为一个exe安装包了.为了区分 ...

  6. Unity在Android和iOS中如何调用Native API

    本文主要是对unity中如何在Android和iOS中调用Native API进行介绍. 首先unity支持在C#中调用C++ dll,这样可以在Android和iOS中提供C++接口在unity中调 ...

  7. Xamarin Mono For Android 4.6.07004 完整离线安装破解版(C#开发Android、IOS工具)

      Xamarin是由Miguel de Icaza成立的一家新的独立公司,目的是给Mono一个继续奋斗的机会.Mono for Android (原名:MonoDroid)可以让开发人员使用 Mic ...

  8. .NET/android/java/iOS AES通用加密解密(修正安卓)

    移动端越来越火了,我们在开发过程中,总会碰到要和移动端打交道的场景,比如.NET和android或者iOS的打交道.为了让数据交互更安全,我们需要对数据进行加密传输.今天研究了一下,把几种语言的加密都 ...

  9. Xamarin Mono 环境搭建(使用Visual Studio 2013 开发android 和 ios )

    本文主要介绍Xamarin结合VS2013来开发Android应用程序,主要会介绍Mono和Xamarin的关系,以及整个搭建环境的过程. 一.Mono和Xamarin介绍 1.Mono简介 Mono ...

随机推荐

  1. day22 模块_1

    核能来袭--模块 1.简单了解模块 2.Collections 3.Time模块 4.functools 一.初识模块 其实之前写的每一个PY文件都是一个模块 还有一些我们一直在使用的模块  buil ...

  2. 深入理解java虚拟机---java虚拟机内存管理(七)

    本地方法栈.java堆.方法区 本地方法栈在HotSpot版本内与java虚拟机栈是合二为一的.不单独区分本地方法栈.但是java虚拟机中是有这样一块区域的. 作用: 1.本地方法栈为虚拟机栈执行ja ...

  3. python笔记3-输出输入、字符串格式化

    输入.输出 python怎么来接收用户输入呢,使用input函数,python2中使用raw_input,接收的是一个字符串,输出呢,第一个程序已经写的使用print,代码入下: 1 2 name=i ...

  4. TortoiseGit 的下载与安装

    一.下载 访问https://tortoisegit.org/ 二.安装 然后就next,install 配置参考:2. TortoiseGit安装与配置

  5. 201621123001 《Java程序设计》第12周学习总结

    1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多流与文件相关内容. 字节流以字节为基本处理单位,字符流以字符为基本处理单位,以Reader和Writer为基础派生出的一系列类 字 ...

  6. 数据库别名AS区别

    Oracle之别名小结 MySQL表别名.字段别名注意事项 字段别名:可加 as  ,也可以不加,可以加单|双引号,也可以不加: 表别名:可加 as ,也可以不加,但是一定不能加单|双引号! Orac ...

  7. 2.Python爬虫入门二之爬虫基础了解

    1.什么是爬虫 爬虫,即网络爬虫,大家可以理解为在网络上爬行的一直蜘蛛,互联网就比作一张大网,而爬虫便是在这张网上爬来爬去的蜘蛛咯,如果它遇到资源,那么它就会抓取下来.想抓取什么?这个由你来控制它咯. ...

  8. SQL拼接大法

    SQL拼接大法:          Step1:括号先写上() Step2:在括号内写上(,     ,     ,     ,      ,     ,) Step3:再写上单引号(,'     ' ...

  9. js- caller、 callee

    caller 返回一个对函数的引用,该函数调用了当前函数.    functionName.caller     functionName对象 是所执行函数的名称.  说明        对于函数来说 ...

  10. JS之鼠标改变img

    代码用途: 通过点击图片,来改变图片内容 代码: <!DOCTYPE html> <html> <body> <script> function cha ...