iApp获取ANHK网页源码

时间:2021-08-06
本文章向大家介绍iApp获取ANHK网页源码,主要包括iApp获取ANHK网页源码使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

所需控件

  • 浏览器 ID1
  • 文本 ID2

载入事件

//浏览器控件ID
s id1=1
//文本控件ID
s id2=2
hsas(id1,true)
t()
{
  s url="http://oyp.anhk.cn/test/demo8.6/a.php"
  s post=null
  //获取的源码将赋值到sss.ym,响应事件与id文本控件的文本更新监听事件绑定
  fn getcode.get(url,post,id2)
  ssj(id2,"ontextchanged")
  {
    syso(sss.ym)
  }
}

getcode.myu

fn cookie(url,post,cookie,id)
t()
{
  f(post=="")
  {
    s post=null
  }
  syso("正在获取")
  hs(url,post,"utf-8",cookie,ym)
  sss ym=ym
  ufnsui()
  {
    time(4,tt)
    sran(1,10000,uu)
    ss(tt+uu,vv)
    us(id,"text",vv)
    syso("获取完成")
  }
}
end fn

fn get(url,post,id)
syso("准备获取")
hs(url,ym)
sr(ym,"/aes.js","file:///storage/emulated/0/iApp/%E9%A1%B9%E7%9B%AE/com.oyp.test/files/aes.js",ym)
sr(ym,"document.cookie=","var cookie=",ym)
ss("iapp.fn('getcode.cookie(\""+url+"\"\,\""+post+"\"\,\"'\+cookie\+'\"\,"+id+")');var oyp=",hh)
sr(ym,"location.href=",hh,ym)
ufnsui()
{
  us(1,"url",ym,"utf-8","text/html",f)
}
end fn

原文地址:https://www.cnblogs.com/oypp/p/15110347.html