function myFunction() {
uu="https://tvtopic.goo.ne.jp/program/ex/655/1056490/";
str="";
try {
var res = UrlFetchApp.fetch(uu);
str=res.getContentText();
} catch (e) { Logger.log("Fail");}
p5=str.indexOf("fa fa-calendar");
p6=str.indexOf("<td>",p5);
p7=str.indexOf("</td>",p6);
date=str.substring(p6,p7);
Logger.log(date);
p1=str.indexOf("</i>キャスト</h2>");
p2=str.indexOf("<!-- section --></div></section>",p1);
str=str.substring(p1,p2);
t1="<dt class=\"nr-ttl\">";
var a=new Array();
sx=0;
p1=0;
while(p1>-1){
p1=str.indexOf(t1,p1+1);
p2=str.indexOf("</dt>",p1);
if(p1>0)sx=sx+1;
if(p1>0)a[sx]=str.substring(p1,p2);
}
number=sx;
var b=new Array();
for(s=1;s<number+1;s++){
p3=a[s].indexOf("/cast/");
p3=a[s].indexOf(">",p3);
p4=a[s].length;
b[s]=a[s].substring(p3+1,p4);
Logger.log(b[s]);
}
}
最終更新:2017年04月27日 05:43