上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: #http://www.ttshitu.com/price.html?spm=nullimport base64import jsonimport requests def base64_api(uname, pwd, img): with open(img, 'rb') as f: base64_ 阅读全文
posted @ 2021-03-28 14:28 mjth 阅读(144) 评论(0) 推荐(0)
摘要: a=[8,88,11,22,11]for i in range(len(a)-1,0,-1): for b in range(i): if a[b]>a[b+1]: a[b],a[b+1]=a[b+1],a[b] print(a) def bublle_sort(alist): """冒泡排序""" 阅读全文
posted @ 2021-03-28 14:25 mjth 阅读(148) 评论(0) 推荐(0)
摘要: import requestsimport reimport jsonfrom lxml.etree import HTMLfrom multiprocessing.dummy import Poolurl='https://www.pearvideo.com/category_5'session= 阅读全文
posted @ 2021-03-28 14:24 mjth 阅读(302) 评论(0) 推荐(0)
摘要: #使用单线程串行方法执行import timedef get_page(str): time.sleep(2) print('正在下载:',str)name=['qwe','est','sdsaa','g56']start_time=time.time()for i in range(len(nam 阅读全文
posted @ 2021-03-28 14:23 mjth 阅读(51) 评论(0) 推荐(0)
摘要: USER_AGENTS = ["Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)","Mozilla/4.0 (compatible; 阅读全文
posted @ 2021-03-28 14:21 mjth 阅读(147) 评论(0) 推荐(0)
摘要: from selenium import webdriverfrom time import sleepbro = webdriver.Chrome()bro.get('https://www.taobao.com/')#标签定位search_input = bro.find_element_by_ 阅读全文
posted @ 2021-03-28 14:20 mjth 阅读(66) 评论(0) 推荐(0)
摘要: from selenium import webdriverfrom lxml.etree import HTMLfrom time import sleep#导入动作链对应的类from selenium.webdriver import ActionChains bro = webdriver.C 阅读全文
posted @ 2021-03-28 14:19 mjth 阅读(49) 评论(0) 推荐(0)
摘要: from selenium import webdriverfrom time import sleepbro = webdriver.Chrome()bro.get('https://mail.qq.com/')sleep(1)bro.switch_to_frame('login_frame')s 阅读全文
posted @ 2021-03-28 14:18 mjth 阅读(39) 评论(0) 推荐(0)
摘要: import timefrom selenium import webdriver#无可视化from selenium.webdriver.chrome.options import Options#规避检测from selenium.webdriver import ChromeOptions d 阅读全文
posted @ 2021-03-28 14:17 mjth 阅读(67) 评论(0) 推荐(0)
摘要: import xlwt,xlrdimport openpyxlimport xlrdimport pymysqlimport xlrdimport pymysqlfname = "zongshujv.xls"bk = xlrd.open_workbook(fname)#shprint(bk)##sh 阅读全文
posted @ 2021-03-28 14:16 mjth 阅读(96) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页