''' Created on 2019年2月27日 @author: User ''' import module.htmlDrawing as hd import time import math import numpy as np def dealWithScriptOut(data,key_index=4): list_input = [] list_inner = [] for index in range(len(data)): #clean nan for i in range(len(data[index][0])): if data[index][0][i] is None or math.isnan(data[index][0][i]): data[index][0][i] = -1 #order by deepth data.sort(key=lambda x:x[0][key_index]) for item in data: list_input.append(item[0]) list_inner.append(item[1]) print(item) print(len(data)) the_max = np.max(list_input,axis=0) the_max = np.array([x if x>0 else 1 for x in the_max]) the_max = np.array((list(the_max)[2:4]+list(the_max)[2:9])*3) input_x = np.array(list_input/the_max) return input_x,list_inner if __name__=="__main__": browser = hd.getdriver() hd.loadPage(browser, "http://www.beian.miit.gov.cn/") hd.adddriver(browser) browser.maximize_window() start = time.time() scripts = ''' function statisticIframe(nodes){ var counts_communicateTags = 0; for(var i=0;i100 && obj.offsetHeight>100 && obj.parentNode.tagName!=null && obj.childNodes.length>0){ maxArea = 0; child_maxArea = null; secondmaxArea = 0; child_secondmaxArea = null; for(var j =0;jmaxArea){ maxArea = obj.childNodes[j].offsetWidth*obj.childNodes[j].offsetHeight; child_maxArea = obj.childNodes[j]; } if(obj.childNodes[j].offsetWidth*obj.childNodes[j].offsetHeight>secondmaxArea && obj.childNodes[j].offsetWidth*obj.childNodes[j].offsetHeight