摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 from selenium.webdriver.common.by import By 4 from lxml imp 阅读全文
posted @ 2020-03-16 21:58 kog_maw 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 from selenium.webdriver.common.by import By 4 5 6 browers_p 阅读全文
posted @ 2020-03-16 21:57 kog_maw 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 4 5 browers_path = r'C:\Users\Administrator\AppData\Local\3 阅读全文
posted @ 2020-03-16 21:56 kog_maw 阅读(1554) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 4 5 browers_path = r'C:\Users\Administrator\AppData\Local\3 阅读全文
posted @ 2020-03-16 21:55 kog_maw 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 4 5 browers_path = r'C:\Users\Administrator\AppData\Local\3 阅读全文
posted @ 2020-03-16 21:54 kog_maw 阅读(186) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver from selenium.webdriver.chrome.options import Options browers_path = r'C:\Users\Administrator\AppData\Local\360Chrome\C 阅读全文
posted @ 2020-03-16 21:53 kog_maw 阅读(211) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver from selenium.webdriver.chrome.options import Options import time browers_path = r'C:\Users\Administrator\AppData\Local 阅读全文
posted @ 2020-03-16 21:52 kog_maw 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 from selenium.webdriver.common.by import By 4 5 6 browers_p 阅读全文
posted @ 2020-03-16 21:51 kog_maw 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 import time 4 5 6 __browser_url = r'C:\Users\Administrator\ 阅读全文
posted @ 2020-03-16 21:50 kog_maw 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1 from selenium import webdriver 2 from selenium.webdriver.chrome.options import Options 3 4 5 ''' 6 selenium :自动化测试工具,本身不是测试工具,只是模拟浏览器操作的工具 7 webdriv 阅读全文
posted @ 2020-03-16 21:49 kog_maw 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1 import requests 2 from lxml import etree 3 from urllib import request 4 import re 5 import os 6 from queue import Queue 7 import threading 8 9 10 '' 阅读全文
posted @ 2020-03-16 21:48 kog_maw 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1 import queue 2 import threading 3 import time 4 5 6 q = queue.Queue(5)#对生成的类对象指定最多可容纳元素 7 q.empty()#判断队列元素个数是否为0 8 9 def q_q (): 10 '''queue的基本函数使用' 阅读全文
posted @ 2020-03-16 21:46 kog_maw 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1 import threading 2 import time 3 import random 4 5 6 gMoney = 1000 7 gCondition = threading.Condition() 8 gtime = 0 9 10 class Producer(threading.Th 阅读全文
posted @ 2020-03-16 21:45 kog_maw 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1 import threading 2 import time 3 import random 4 5 6 gMoney = 1000 7 gLock = threading.Lock() 8 9 class Producer(threading.Thread): 10 def run(self) 阅读全文
posted @ 2020-03-16 21:42 kog_maw 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1 import threading 2 3 value = 0 4 glock = threading.Lock() 5 6 def value_add(): 7 global value 8 glock.acquire()#加锁 9 for x in range(1000000): 10 val 阅读全文
posted @ 2020-03-16 21:41 kog_maw 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1 import threading 2 import time 3 4 5 class write_a(threading.Thread): 6 def run(self): 7 for x in range(3): 8 print("写字%s" % threading.current_threa 阅读全文
posted @ 2020-03-16 21:39 kog_maw 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 1 import time 2 import threading 3 4 5 def write_a(): 6 for x in range(3): 7 print("写字%s"%threading.current_thread()) 8 time.sleep(1) 9 10 def draw_a( 阅读全文
posted @ 2020-03-16 21:38 kog_maw 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1 import csv 2 3 4 def csv_rd(): 5 with open(r'E:\anacondatest\PythonData\aaaaa.csv','r',encoding='utf-8') as fp: 6 7 readers = csv.reader(fp) 8 print 阅读全文
posted @ 2020-03-16 21:37 kog_maw 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1 import json 2 3 4 a = [{'a':1},{'b':'张三'}] 5 b = json.dumps(a) 6 7 # with open('a.json','w',encoding='utf-8') as fp: 8 # # fp.write(b) 9 # #json内置函数 阅读全文
posted @ 2020-03-16 21:36 kog_maw 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 from lxml import etree 2 import requests 3 4 5 baseurl = 'https://www.dytt8.net' 6 headers = { 7 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) 阅读全文
posted @ 2020-03-16 21:35 kog_maw 阅读(392) 评论(0) 推荐(0) 编辑