上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页
摘要: 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 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页