In [4]:
import requests

In [10]:
from bs4 import BeautifulSoup

In [16]:
url='https://service.chinaums.com/uis/uisWebLogin/desktop?Mon%20Dec%2018%202017%2020:45:18%20GMT+0800'

In [17]:
def get_html(url):
    try:
        r=requests.get(url,timeout=16)
        status=r.status_code
        r.raise_for_status()
        r.encoding=r.apparent_encoding
        return r.text
    except:
        now_time=time.strftime('%Y%m%d%H%M%S')
        logging.info(now_time +'   ' +'get_html 异常'+'   '+ url)

In [18]:
html =get_html(url)

In [19]:
soup = BeautifulSoup(html, 'html.parser')
print(soup.prettify())


<!DOCTYPE html>
<!-- 是否忽略特殊标签:否 -->
<!-- HTTP 1.1 -->
<meta content="no-store" http-equiv="Cache-Control"/>
<!-- 忽略缓存 -->
<meta content="no-cache" http-equiv="Pragma"/>
<!-- Prevents caching at the Proxy Server -->
<meta content="0" http-equiv="Expires"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<!-- 加载C标签 -->
<!-- 项目路径ctx -->
<script>
 var ctx = "/uis";
	var language = "zh_CN";
	var titleMsg = "温馨提示";
	var contentMsg = "温馨提示";
	var verificationCodeMsg = "请输入验证码";
	var c_CheckedNodeMsg = "请先选择一个节点";
	var reminderMsg = "温馨提示";
	var c_CloseMsg = "取 消";
	var c_EnsureMsg = "确 定";
	var c_SureDeleteMsg = "确定要删除吗";
	var c_RemarkLengthMsg = "描述请控制在200个字符以内";
	var c_InputSeqMsg = "请输入排序号";
</script>
<!-- 基本的CSS和JS -->
<link href="/uis/css/base.css?version=v1_15" rel="stylesheet" type="text/css"/>
<link href="/uis/css/funds/new.css" rel="stylesheet" type="text/css"/>
<link href="/uis/css/funds/liushui.css" rel="stylesheet" type="text/css"/>
<script src="/uis/js/jquery-1.7.1.min.js" type="text/javascript">
</script>
<script src="/uis/js/base.js?version=v1_6" type="text/javascript">
</script>
<script src="/uis/js/style.js?version=v1_1" type="text/javascript">
</script>
<script src="/uis/js/My97DatePicker/WdatePicker.js" type="text/javascript">
</script>
<!-- //Google Analytics  -->
<script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-35787622-1', 'chinaums.com');
  ga('send', 'pageview');
</script>
<!-- // Baidu Analytics  -->
<script>
 var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?1c0d3d1413bff5b48a4a97f64a35f6a4";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
  <link href="/uis/css/img/favicon.ico" rel="shortcut icon"/>
  <script src="/uis/js/login_V1.1.js" type="text/javascript">
  </script>
  <link href="/uis/css/login_V1.1.css" rel="stylesheet" type="text/css"/>
  <script src="/uis/js/main.js" type="text/javascript">
  </script>
  <script src="/uis/js/browser.js" type="text/javascript">
  </script>
  <script src="/uis/js/jquery.cookie.js" type="text/javascript">
  </script>
  <script src="//static.geetest.com/static/tools/gt.js" type="text/javascript">
  </script>
  <link href="/uis/js/slides/slides.css" rel="stylesheet" type="text/css"/>
  <title>
   银联商务有限公司-网上服务系统
  </title>
  <style>
   #languageDiv a {
				display: none;
			}
  </style>
  <script>
   var initVal = "用户名/手机/邮箱";
			var veVal = "验证码";
			var languageDivMS;
			$(function() {
		    	if (self != top){
		    		top.location.replace(window.location.href);
		   		}
				$("#submitFlag").val('true');
				$("#userAcntn").val(initVal);
				$("#userAcntn").css("color", "#A7A7A7");
				$("#userAcntn").focus(function() {
					var theVal = this.value;
					if($.trim(theVal) == initVal) {
						this.value = "";
						$("#userAcntn").css("color", "");
					}
				});
				$("#userAcntn").blur(function() {
					var value = this.value;
					if($.trim(value) == "") {
						this.value = initVal;
						$("#userAcntn").css("color", "#A7A7A7");
					}
				});
				//             $("#validateCode2").css("color", "#A7A7A7");
				//             veVal = "验证码";
				//             $("#validateCode2").val(veVal);
				//             $("#validateCode2").focus(function() {
				//                 var value = this.value;
				//                 if ($.trim(value) == veVal) {
				//                     this.value = "";
				//                     $("#validateCode2").css("color", "");
				//                 }
				//             });
				//             $("#validateCode2").blur(function() {
				//                 var value = this.value;
				//                 if (doTrim(value) == "") {
				//                     this.value = veVal;
				//                     $("#validateCode2").css("color", "#A7A7A7");
				//                 }
				//             });
				
				var rightVal = $(".poaDivContent").offset().left;
				$(".loginMask").css("left", rightVal + 653 + "px");
				$(".loginMask").show();
				$(".loginKuang").css("left", rightVal + 713 + "px");
				$(".loginKuang").show();
				$(".2wm").css("left", rightVal + 653 + "px");
				$(".2wmImg").css("left", rightVal + 653 + "px");
				$(".2wmImg").show();
				$(window).resize(function() {
					rightVal = $(".poaDivContent").offset().left;
					$(".loginMask").css("left", rightVal + 653 + "px");
					$(".loginMask").show();
					$(".loginKuang").css("left", rightVal + 713 + "px");
					$(".loginKuang").show();
					$(".2wm").css("left", rightVal + 653 + "px");
					$(".2wmImg").css("left", rightVal + 653 + "px");
					$(".2wmImg").show();
					var lv = $("#mdiv").offset().left;
					var tv = $("#mdiv").offset().top;
					$("#xlgct").css({
						"top": tv,
						"left": lv + 5
					});
					$("#xlgct").show();
				});
				$("#selectLanguage").mouseover(function() {
					$("#languageDiv").css({
						"top": $(this).offset().top + 25,
						"left": $(this).offset().left + 5
					}).show();
					$("#languageDiv a").show();
				});
				$("#selectLanguage,#languageDiv").mouseout(function() {
					languageDivMS = setTimeout(function() {
						$("#languageDiv").hide();
					}, 1000);
				});
				$("#languageDiv").mouseover(function() {
					clearInterval(languageDivMS);
					languageDivMS = undefined;
				});
				
				$(document).keydown(function(event) {
					if(event.keyCode == 13 && $("#lgmk2").css("display") != "none") {
						$("#lgbtn").click();
					}
				});
				
				 reloadvalidateCode();

			});
			
			function reloadvalidateCode() {
				$.ajax({
					url: "/uis/validateCodeGT?t=" + (new Date()).getTime(),
					type: "get",
					dataType: "json",
					success: function(data) {
						initGeetest({
							gt: data.gt,
							challenge: data.challenge,
							product: "popup",
							offline: !data.success
						},function(captchaObj){
							
							captchaObj.onSuccess(function() {
								var validate = captchaObj.getValidate();
								$("input[name='geetest_challenge']").val(validate.geetest_challenge);
								$("input[name='geetest_validate']").val(validate.geetest_validate);
								$("input[name='geetest_seccode']").val(validate.geetest_seccode);
								
								save();
								closeLogin();
							});
// 							captchaObj.bindOn("#lgbtn");
							captchaObj.appendTo("#captchaLoginForm");
							$("#lgbtn").click(function(){
								if(checkLoginNameAndPwd()){
									//图形验证
									captchaObj.show();
									$("#lgError").hide();
									$("#lgmk2,#lgkuang2,#lgct,#lgife,#xlgct").hide();
									$("#lgife").attr("src", "");
								}
							});
							
						});
					}
				});
				
// 	        $("#validateCodeImg").attr("src","/uis/validateCode?data=" + new Date()+ Math.floor(Math.random() * 24));
	    
			}
			var loginCss;

			function openLogin() {
				var src = "/uis/uisWebLogin/caslogin";
				$("#lgmk2,#lgkuang2,#lgct").show();
				var lv = $("#mdiv").offset().left;
				var tv = $("#mdiv").offset().top;
				$("#xlgct").css({
					"top": tv,
					"left": lv + 5
				});
				$("#xlgct").show();
			}

			/* function appInfo() {
				var browser = {
						appname: 'unknown',
						version: 0,
						Kernel: 'unknown'
					},
					userAgent = window.navigator.userAgent.toLowerCase();
				//IE,firefox,opera,chrome,netscape  
				if (/(msie|firefox|opera|chrome|netscape)\D+(\d[\d.]*)/.test(userAgent)) {
					browser.appname = RegExp.$1;
					browser.version = RegExp.$2;
				} else if (/version\D+(\d[\d.]*).*safari/.test(userAgent)) { // safari  
					browser.appname = 'safari';
					browser.version = RegExp.$2;
				}
				if (/(trident|gecko|webkit|opr)\D/.test(userAgent)) {
					browser.Kernel = RegExp.$1;
				}
				return browser;
			} */

			function save() {
				$("#loginButton").focus();
				if(!checkLoginNameAndPwd()) {
					return;
				}
				if($("#submitFlag").val() == 'false') {
					return;
				}
				$("#submitFlag").val('false');
				$("#userAcnt").val($("#userAcntn").val());
				$("#userPwd").val($("#userPwdn").val());
				// 	        $("#validateCode").val($("#validateCode2").val());
				$("#browserName").val($.NV('shell'));
				$("#browserKernel").val($.NV('UA'));
				$("#browserVersion").val(parseInt($.NV('version')));

				$.ajax({
					type: "POST",
					url: ctx + "/uisWebLogin/login",
					data: $('#form').serialize(),
					success: function(data) {
						var objectValue = data.respCode;
						var userId = data.userId;
						var flag = data.flag;
						var newUserHere = data.newUserHere; //新建库是否存在该用户
						var userMobile = data.userMobile; //判断电话是否存在
						if(newUserHere == 1) {
							if(userMobile == null) {
								$("#ax").hide();
								openAlert("温馨提示", "用户手机号码不存在", function() {
									window.location.href = "/uis/uisWebLogin/logout";
								});
							} else {
								toUrl('cellphoneVerify');
							}
						} else if("000000" == objectValue) {
							toUrl('desktop?' + new Date());
						} else if("020001" == objectValue) {
							$("#submitFlag").val('true');
							toUrl('toActivationAgreement?firstLoginFlag=firstLoginFlag');
						} else if("020004" == objectValue) {
							$("#submitFlag").val('true');
							openAlert("温馨提示", data.respDesc, function() {
								toUrl('toActivationEnd');
							});
						} else if("020005" == objectValue) {
							toUrl('modifyPwd?userId=' + userId + '&flag=' + flag);
						} else if("020006" == objectValue) {
							$("#ax").hide();
							openAlert("温馨提示", "该用户已被锁定,请联系管理员", function() {
								toUrl("/uis/uisWebLogin/logout");
							});
						} else {
							$("#submitFlag").val('true');
							openAlert("温馨提示", data.respDesc, function() {
								// 	                                reloadvalidateCode();
								if(!isEmpty(data.respDesc) &&
									data.respDesc.indexOf("验证码") > -1) {
									// 	                                    $("#validateCode2").focus();
									// 	                                    $("#validateCode2").select();
								}
							});
						}
					}
				});
			}

			function checkLoginNameAndPwd() {
				var userAcntnVal = $("#userAcntn").val();
				var userPwdnVal = $("#userPwdn").val();
				if(isEmpty(userAcntnVal) || userAcntnVal == "用户名/手机/邮箱") {
					$("#lgError td:eq(1)").html("登录名不能为空,请输入登录名").show();
					$("#lgError").show();
					// 	            reloadvalidateCode();
					return false;
				}
				if(isEmpty(userPwdnVal)) {
					$("#lgError td:eq(1)").html("密码不能为空").show();
					$("#lgError").show();
					// 	            reloadvalidateCode();
					return false;
				}
				return true;
			}

			function international(args) {
				$.getJSON(ctx + "/international", {
					localeLanguage: args,
					timeUpdate: encodeURI(encodeURI(new Date()))
				}, function(data) {
					toUrl('login');
					/*  openAlert("温馨提示", data.respDesc,function(){
					     toUrl('login');
					 }); */
				});
			}

			function lc(val) {
				if(val == 1) {
					$("#show1").hide();
					$("#show2").fadeIn(500);
				} else {
					$("#show2").hide();
					$("#show1").fadeIn(500);
				}
			}

			function closeLogin() {
				$("#lgError").hide();
				$("#userAcntn").val("");
				$("#userPwdn").val("");
				$("#lgmk2,#lgkuang2,#lgct,#lgife,#xlgct").hide();
				$("#lgife").attr("src", "");
			}
  </script>
 </head>
 <body class="of">
  <form action="/uis/uisWebLogin/login" id="form" method="post">
   <input id="submitFlag" name="submitFlag" type="hidden" value="true"/>
   <input id="userAcnt" name="userAcnt" type="hidden"/>
   <input id="userPwd" name="userPwd" type="hidden"/>
   <!--     	<input id="validateCode" name="validateCode" type="hidden" /> -->
   <input id="browserName" name="browserName" type="hidden"/>
   <input id="browserKernel" name="browserKernel" type="hidden"/>
   <input id="browserVersion" name="browserVersion" type="hidden"/>
   <input name="geetest_challenge" type="hidden"/>
   <input name="geetest_validate" type="hidden"/>
   <input name="geetest_seccode" type="hidden"/>
   <input id="loginVersion" name="loginVersion" type="hidden" value="2.0"/>
   <div class="poaDiv">
    <center>
     <div class="poaDivContent">
     </div>
    </center>
   </div>
   <div style="height: 75px;">
   </div>
   <div style="height: 426px;">
    <div class="flexslider" style="height: 426px;width: 100%;position: absolute;top: 75px;">
     <center>
      <ul class="slides" style="height: 425px;width: 1428px;">
       <li style="background:url(/uis/css/img/login/loginBg1.jpg);background-size:100% 425px;">
       </li>
       <li style="background:url(/uis/css/img/login/loginBg2.jpg);background-size:100% 425px;">
       </li>
       <li style="background:url(/uis/css/img/login/loginBg3.jpg);background-size:100% 425px;">
       </li>
       <li style="background:url(/uis/css/img/login/loginBg4.jpg);background-size:100% 425px;">
       </li>
      </ul>
     </center>
    </div>
    <script src="/uis/js/slides/js/jquery.flexslider-min.js" type="text/javascript">
    </script>
    <script type="text/javascript">
     $(document).ready(function() {
						$('.flexslider').flexslider({
							directionNav: true,
							pauseOnAction: false
						});
					});
    </script>
   </div>
   <div class="topCeng">
    <center>
     <table width="970">
      <tr>
       <td style="padding-left: 15px;" width="500">
        <img src="/uis/css/img/logo5.jpg" style="width: 165px;"/>
        <font class="titleFont">
         网上服务系统 2.0
        </font>
       </td>
       <td class="topRight" width="500">
        <a onclick="window.open('http://www.chinaums.com/')">
         官网首页
        </a>
        |
        <a onclick="toUrl('/uis/uisWebLogin/toFAQ?tab=faq1');">
         帮助中心
        </a>
        |
        <a onclick="window.open('http://www.chinaums.com/Channel/1242265')">
         提建议
        </a>
        |
        <span id="selectLanguage">
         <font>
          语言/language
         </font>
        </span>
       </td>
      </tr>
     </table>
    </center>
   </div>
   <div id="languageDiv">
    <center>
     <img src="/uis/css/img/language_top.jpg"/>
    </center>
    <a onclick="international('zh_CN');">
     简体中文
    </a>
    <a onclick="international('zh_TW');">
     繁体中文
    </a>
    <a onclick="international('en_US');">
     English
    </a>
   </div>
   <table border="0" class="loginKuang">
    <tr>
     <td class="lc1">
      银联商务通行证
     </td>
    </tr>
    <tr>
     <td class="lc2">
      一个账号可以跨多个系统登录
     </td>
    </tr>
    <tr>
     <td style="text-align: center;height: 70px;">
      <div id="dl1" onclick="openLogin();">
       登      录
      </div>
     </td>
    </tr>
    <tr>
     <td style="text-align: center;height: 70px;">
      <div id="jh1" onclick="toUrl('activationStart');">
       激      活
      </div>
     </td>
    </tr>
   </table>
   <div class="bottomCeng">
    <center>
     <div class="loginBottom2">
      <center>
       <table>
        <tr>
         <td>
          <a onclick="window.open('http://www.chinaums.com/Channel/1262731')">
           支付承诺
          </a>
         </td>
         <td>
          |
         </td>
         <td>
          <a onclick="window.open('http://www.chinaums.com/Channel/1262639')">
           使用条款
          </a>
         </td>
         <td>
          |
         </td>
         <td>
          <a onclick="toUrl('/uis/uisWebLogin/toFAQ?tab=faq');">
           常见问题
          </a>
         </td>
         <td>
          |
         </td>
         <td>
          <a onclick="window.open('http://www.chinaums.com/Channel/1266668')">
           加入银商
          </a>
         </td>
         <td>
          |
         </td>
         <td>
          <a onclick="window.open('http://www.chinaums.com/Channel/1245344')">
           关于我们
          </a>
         </td>
         <td>
          |
         </td>
         <td>
          <a onclick="window.open('http://www.chinaums.com/Channel/1263011')">
           合作伙伴
          </a>
         </td>
        </tr>
       </table>
      </center>
     </div>
     <div class="loginBottom3">
      <center>
       <span>
        银联商务
       </span>
       <span>
        版权所有 沪ICP备05003469
       </span>
       <span>
        地址:上海浦东新区张衡路1006号
       </span>
       <span>
        邮编:201203
       </span>
      </center>
     </div>
    </center>
   </div>
  </form>
  <table align="center" class="yindaoMaskTb">
   <tr>
    <td class="op" id="ydt_0_0" valign="top">
     <div id="ydt_0_0Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
    <td class="op" id="ydt_0_1" valign="top">
     <div id="ydt_0_1Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
    <td class="op" id="ydt_0_2" valign="top">
     <div id="ydt_0_2Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
   </tr>
   <tr>
    <td class="op" id="ydt_1_0" valign="top">
     <div id="ydt_1_0Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
    <td class="op" id="ydt_1_1" valign="top">
     <div id="ydt_1_1Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
    <td class="op" id="ydt_1_2" valign="top">
     <div id="ydt_1_2Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
   </tr>
   <tr>
    <td class="op" id="ydt_2_0" valign="top">
     <div id="ydt_2_0Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
    <td class="op" id="ydt_2_1" valign="top">
     <div id="ydt_2_1Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
    <td class="op" id="ydt_2_2" valign="top">
     <div id="ydt_2_2Div">
      <a style="width: 1px;display: block;">
      </a>
     </div>
    </td>
   </tr>
  </table>
  <div class="yindaoMask">
  </div>
  <div class="yindao yindaoParent" id="yindao1_1">
   <center>
    <table border="0" width="98%">
     <tr>
      <td align="right" style="padding: 5px 5px 0px 5px;">
       <a onclick="closeYMark();" style="color: #CDCDCD; font-size: 18px;" title="关闭">
        X
       </a>
      </td>
     </tr>
     <tr>
      <td style="padding: 0px 20px 0px 20px; line-height: 18px;">
       <font style="font-size: 14px; font-family: '微软雅黑';">
        亲~网上服务系统2.0正式上线啦!为了确保您能正常使用本系统、也为了我们能够更好的为您提供服务,请您进行账号激活,谢谢!
       </font>
      </td>
     </tr>
     <tr>
      <td align="center" style="padding-top: 10px;">
       <div class="ynButton" onclick="closeYMark();">
        我知道了
       </div>
      </td>
     </tr>
    </table>
   </center>
  </div>
  <div class="yindao yindaoSon" id="yindao1_2">
   <img src="/uis/css/img/tempydJH.jpg"/>
  </div>
  <div class="toWsad" id="yindao_toRight">
   <img src="/uis/css/img/toRight.png"/>
  </div>
  <div id="lgmk2">
  </div>
  <div id="lgkuang2">
   <center>
    <div id="mdiv">
    </div>
   </center>
  </div>
  <div id="lgct">
   <center>
    <table id="lgTable">
     <tbody id="show1">
      <tr>
       <td id="lgChange">
        <img onclick="lc(1);" src="/uis/css/img/login/lgChange.png"/>
       </td>
      </tr>
      <tr>
       <td id="lgtitle">
        用户登录
       </td>
      </tr>
      <tr>
       <td height="15">
        <table id="lgError">
         <tr>
          <td style="text-align: right;width: 30px;">
           <img src="/uis/css/img/lgt.png"/>
          </td>
          <td>
          </td>
         </tr>
        </table>
       </td>
      </tr>
      <tr>
       <td height="60">
        <div id="lgtb">
         <input id="userAcntn" style="width: 190px;"/>
        </div>
       </td>
      </tr>
      <tr>
       <td height="60">
        <div id="pwtb">
         <input id="userPwdn" style="width: 190px;" type="password"/>
        </div>
        <div id="captchaLoginForm">
        </div>
       </td>
      </tr>
      <tr>
       <td height="70">
        <table id="lgbtn">
         <tr>
          <td>
           登      录
          </td>
         </tr>
        </table>
       </td>
      </tr>
      <tr>
       <td>
        <div id="A" style="margin-right:30px">
         <a href="/uis/restUserPwd/forgetPwd" id="A">
          忘记密码
         </a>
        </div>
       </td>
      </tr>
      <tr>
       <td>
       </td>
      </tr>
     </tbody>
     <tbody id="show2">
      <tr>
       <td id="lgChange2">
        <img onclick="lc(2);" src="/uis/css/img/login/lgChange2.png"/>
       </td>
      </tr>
      <tr>
       <td id="lgtitle2">
        扫码下载
       </td>
      </tr>
      <tr id="saoma">
       <td>
        <img src="/uis/css/img/login/appDown.png"/>
       </td>
      </tr>
     </tbody>
    </table>
   </center>
  </div>
  <a id="xlgct" onclick="closeLogin();">
   x
  </a>
 </body>
 <link href="/uis/css/loading.css" rel="stylesheet" type="text/css"/>
 <!-- 是否忽略特殊标签:否 -->
 <!-- 忽略缓存 -->
 <head>
  <meta contect="no-cache" http-equiv="Pragma"/>
 </head>
 <div class="loadingDiv">
 </div>
 <table class="loadingImg">
  <tr>
   <td align="center" valign="middle">
    <div class="loading-3" style="width: 100px;">
     <i>
     </i>
     <i>
     </i>
     <i>
     </i>
     <i>
     </i>
     <i>
     </i>
     <i>
     </i>
     <i>
     </i>
     <i>
     </i>
    </div>
    <img id="old" src="/uis/css/img/icon/loading3.gif" style="display: none;" width="30"/>
    Loading . . . . . .
   </td>
  </tr>
 </table>
 <div class="maskCss">
 </div>
 <div class="maskCss2">
 </div>
 <div class="alertCeng">
  <div class="blueTitle">
   <div class="blueTitleDiv" id="alertTitle">
    温馨提示
   </div>
   <div class="blueTitleDiv textAlignrRight">
    <a id="ax" onclick="if(aFunObj!=undefined)aFunObj();closeAlert();" title="关 闭">
     X
    </a>
   </div>
  </div>
  <table align="center">
   <tr>
    <td width="70">
     <img src="/uis/css/img/tishi1.png" width="90"/>
    </td>
    <td>
     <div id="alertContent" style="overflow-Y: auto;line-height: 16px;">
      温馨提示
     </div>
    </td>
   </tr>
   <tr>
    <td align="center" colspan="2">
     <hr class="hrStyle"/>
     <input class="blueButton margin10" onclick="if(aFunObj!=undefined)aFunObj();closeAlert();" type="button" value="确 定 "/>
    </td>
   </tr>
  </table>
 </div>
 <div class="confirmCeng">
  <div class="blueTitle">
   <div class="blueTitleDiv" id="confirmTitle">
    温馨提示
   </div>
   <div class="blueTitleDiv textAlignrRight">
    <a onclick="closeConfirm();" title="关 闭">
     X
    </a>
   </div>
  </div>
  <table align="center">
   <tr>
    <td width="70">
     <img src="/uis/css/img/tishi1.png" width="90"/>
    </td>
    <td id="confirmContent" style="height: 100px;width: 380px;">
     温馨提示
    </td>
   </tr>
   <tr>
    <td align="center" colspan="2">
     <hr class="hrStyle"/>
     <input class="blueButton margin10" id="cmok" onclick="doConfirmFun();if(autoClose!=1)closeConfirm();" type="button" value="确 定 "/>
     <input class="redButton2 margin10" id="cmno" onclick="doClConfirmFun();closeConfirm();" type="button" value="取 消 "/>
    </td>
   </tr>
  </table>
 </div>
 <div class="openIframe">
  <iframe border="0" class="ifr" frameborder="0" id="oifr" src="">
  </iframe>
 </div>
 <div class="maskIfrDiv" id="maskIfrDiv">
  <table>
   <tr class="cursorMove" id="maskIfrTitleTr">
    <td align="left" id="maskIfrTitle">
     注册用户
    </td>
    <td>
    </td>
    <td align="right">
     <a onclick="closeCeng();" title="关 闭">
      X
     </a>
    </td>
   </tr>
  </table>
  <iframe border="0" frameborder="0" id="maskIfr" name="ifr" src="">
  </iframe>
 </div>
 <script type="text/javascript">
  var posX;
		var posY;       
		document.getElementById("maskIfrTitleTr").onmousedown=function(e){
			thid = "#maskIfrDiv";
		    if(!e) e = window.event;  //IE
		    posX = e.clientX - parseInt($(thid).css("left"));
		    posY = e.clientY - parseInt($(thid).css("top"));
		    document.onmousemove = mousemove;           
		};
		document.onmouseup = function(){document.onmousemove = null;};
		function mousemove(ev){
		    if(ev==null) ev = window.event;//IE
		    x = (ev.clientX - posX) + "px";
		    y = (ev.clientY - posY) + "px";
		    $(thid).css("left",x);
		    $(thid).css("top",y);
		}
		var aFunObj;
		var autoClose;
		var resUserStatus = 0;
		var dn = "";
		var pogID = 0;
		var sogList = [];
		var sogList2 = [];
		var sgpList = [];
		var theOgID;
		var theOgID2;
		var theGpID;
		
		if(isIE()){
			$(".loading-3").hide();
			$("#old").show();
		}
 </script>
 <!-- 加载弹出层(自定义alert、confirm等等) -->
 <style>
  #lgtb {
			width: 239px;
			height: 36px;
			margin: auto;
			background-image: url("/uis/css/img/login/lgtb.png");
			background-repeat: no-repeat;
			text-align: right;
		}
		
		#pwtb {
			width: 239px;
			height: 36px;
			margin: auto;
			background-image: url("/uis/css/img/login/pwtb.png");
			background-repeat: no-repeat;
			text-align: right;
		}
		
		#yztb {
			width: 119px;
			height: 36px;
			margin-left: 27px;
			background-image: url("/uis/css/img/login/yztb.png");
			background-repeat: no-repeat;
			text-align: right;
			float: left;
		}
		
		#lgtb input,
		#pwtb input,
		#yztb input {
			font-size: 16px;
			padding: 2px;
			background: none;
			margin-top: 7px;
			margin-right: 7px;
			border: 0px;
		}
		
		#dl1 {
			text-align: center;
			color: #ffffff;
			text-align: center;
			cursor: pointer;
			font-weight: bold;
			font-family: 微软雅黑;
			font-size: 14px;
			background-image:url("/uis/css/img/dlbg.png");
			background-repeat: no-repeat;
			padding: 10px 10px 13px 10px;
		}
		
		#jh1 {
			font-weight: bold;
			font-family: 微软雅黑;
			color: #ffffff;
			text-align: center;
			cursor: pointer;
			background-image:url("/uis/css/img/jhbg.png");
			background-repeat: no-repeat;
			padding: 10px 10px 13px 10px;
			font-size: 14px;
		}
		
		#lgError {
			margin:auto;
			display: none;
			color: #9B9B9B;
		}
		
		#show2 {
			display: none;
		}
		
		#lgChange2 {
			text-align: right;
			vertical-align: top;
			height: 50px;
			cursor: pointer;
		}
		
		#lgtitle2 {
			font-weight: bold;
			font-family: 微软雅黑;
			font-size: 20px;
			color: #ffffff;
			height: 24px;
			text-align: center;
		}
		
		#saoma {
			vertical-align: top;
			text-align: center;
		}
		
		#saoma img {
			margin-top: 50px;
			height: 120px;
			width: 120px
		}
		
		#lgmk2 {
			position: absolute;
			z-index: 8500;
			filter: alpha(opacity=85);
			background: #666;
			opacity: 0.65;
			-moz-opacity: 0.65;
			left: 0;
			top: 0;
			height: 100%;
			width: 100%;
			display: none;
		}
		
		#lgkuang2 {
			position: absolute;
			z-index: 8600;
			filter: alpha(opacity=30);
			opacity: 0.3;
			-moz-opacity: 0.3;
			left: 0;
			top: 0;
			height: 100%;
			width: 100%;
			display: none;
			background: none;
		}
		
		#lgkuang2 div {
			width: 295px;
			height: 373px;
			background: #666;
			margin-top: 103px;
			margin-right: 35px;
			background: #000000;
		}
		
		#lgChange,
		#lgChange2 {
			cursor: default;
		}
		
		#lgChange img,
		#lgChange2 img {
			cursor: pointer;
		}
		
		#lgbtn {
			margin:auto;
			-moz-border-radius: 3px;
			/* Gecko browsers */
			-webkit-border-radius: 3px;
			/* Webkit browsers */
			border-radius: 3px;
		}
		
		#selectLanguage {
			color: #6C6C6C;
			margin-left: 10px;
			cursor: pointer;
			background-image: url("/uis/css/img/language.png");
			background-repeat: no-repeat;
			padding-left: 20px;
		}
		
		#selectLanguage font {
			text-decoration: underline;
			font-size: 12px;
		}
		
		#languageDiv {
			position: absolute;
			width: 95px;
			height: 77px;
			background: #ffffff;
			right: 230px;
			top: 70px;
			z-index: 99999999999999999;
			box-shadow: 0 1px 7px 0 #CCCCCC;
			-webkit-box-shadow: 0 1px 7px 0 #CCCCCC;
			-moz-box-shadow: 0 1px 7px 0 #CCCCCC;
			border-top: 1px solid #c1c1c1;
			display: none;
		}
		
		#languageDiv img {
			position: absolute;
			top: -7px;
		}
		
		#languageDiv a {
			text-align: center;
			cursor: pointer;
			display: block;
		}
		
		#mdiv,
		#lgChange img,
		#lgChange2 img,
		#saoma img,
		#validateCodeImg {
			-moz-border-radius: 4px;
			/* Gecko browsers */
			-webkit-border-radius: 4px;
			/* Webkit browsers */
			border-radius: 4px;
		}
		
		#A {
			color: #FFF;
			text-align: right;
			/* 	text-align:left; */
		}
		
		.gt_popup,.popup,.gt_popup_wrap{
			z-index: 999999;
		}
 </style>
</html>

In [20]:
from selenium import webdriver

In [21]:
driver = webdriver.PhantomJS(executable_path="phantomjs.exe")


---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
D:\Python\Anaconda3\envs\tensorflow\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     73                                             close_fds=platform.system() != 'Windows',
---> 74                                             stdout=self.log_file, stderr=self.log_file)
     75         except TypeError:

D:\Python\Anaconda3\envs\tensorflow\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds)
    675                                 errread, errwrite,
--> 676                                 restore_signals, start_new_session)
    677         except:

D:\Python\Anaconda3\envs\tensorflow\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
    954                                          cwd,
--> 955                                          startupinfo)
    956             finally:

FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

WebDriverException                        Traceback (most recent call last)
<ipython-input-21-516b4d663adf> in <module>()
----> 1 driver = webdriver.PhantomJS(executable_path="phantomjs.exe")

D:\Python\Anaconda3\envs\tensorflow\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py in __init__(self, executable_path, port, desired_capabilities, service_args, service_log_path)
     50             service_args=service_args,
     51             log_path=service_log_path)
---> 52         self.service.start()
     53 
     54         try:

D:\Python\Anaconda3\envs\tensorflow\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     79                 raise WebDriverException(
     80                     "'%s' executable needs to be in PATH. %s" % (
---> 81                         os.path.basename(self.path), self.start_error_message)
     82                 )
     83             elif err.errno == errno.EACCES:

WebDriverException: Message: 'phantomjs.exe' executable needs to be in PATH. 

In [ ]: