Home > other >  How to obtain the onClick play window file in python
How to obtain the onClick play window file in python

Time:10-18

In the process of crawl site document in python has a problem, no link to the target file, but rather an onclick popup window, behind a save dialog box, click the need to enter a file name, then click the save the download is complete, the onclick calls a js function, I posted below, a great god, please help me have a look at, how to use python batch for this document,
The function SaveDoc ()
{
Var suffix=g_isUserView? "PDF" : "doc";
Var fn=IEHelper. IEH_GetNewFileName (" please specify a new file name: ", suffix);
If (fn!=null & amp; & Fn!="")
{
Var. L=IEHelper IEH_CopyFile (g_fileName, fn);
If (l==1) {
HJAlert (" save file to complete!" );
If (g_isUserView) {//record file download situation when the user to see
Number of [var operDesc="download file" value + + form1. HdnSeqnum. "] file ".
Hjoa. HJOAHelper. AjaxReportUserOperEvent (2, g_userId, operDesc, form1) hdnSeqnum) value, ""," ", "");
}
}
The else {
HJAlert (" save file error!" );
}
}
}
  • Related