上一页 1 ··· 121 122 123 124 125 126 127 128 129 ··· 189 下一页
摘要: ''' 三种等待方法: 1.强制等待sleep(xx) 强制等待,不管你浏览器是否加载完了,程序都得等待,时间一到,继续执行下面的代码,作为调试很有用,有时候也可以在代码里这样等待,不过不建议总用这种等待方式,太死板,严重影响程序执行速度。 2.隐性等待implicitly_wait(xx) 隐形等 阅读全文
posted @ 2021-11-05 19:30 myrj 阅读(5559) 评论(0) 推荐(0)
摘要: from selenium.webdriver import Remote from selenium.webdriver.chrome import options from selenium.common.exceptions import InvalidArgumentException im 阅读全文
posted @ 2021-11-03 17:19 myrj 阅读(290) 评论(0) 推荐(0)
摘要: import pymysql connect = pymysql.connect(user = 'm', password = 'M', db = 'x', host = 'rm', port = 3306, charset = 'utf8' ) con = connect.cursor() bu= 阅读全文
posted @ 2021-11-03 16:57 myrj 阅读(910) 评论(0) 推荐(0)
摘要: import configparser,sys cf = configparser.ConfigParser() #写INI def xini(): executor_url = "100" session_id = "6666" cf.add_section("ssh") cf.set("ssh" 阅读全文
posted @ 2021-11-03 14:04 myrj 阅读(390) 评论(0) 推荐(0)
摘要: begin declare sum int(0); select count(*) into sum from bm51 where bzz='0'; if (sum<20) then UPDATE bm51 SET bzz='0'; end if; end 阅读全文
posted @ 2021-11-02 16:50 myrj 阅读(57) 评论(0) 推荐(0)
摘要: UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 14-14: Non-BMP character not supported in Tk 出现类似表明不能输出相应的代码,只要不输出就不报错了 阅读全文
posted @ 2021-11-02 05:57 myrj 阅读(469) 评论(0) 推荐(0)
摘要: import pymysql,itertools connect = pymysql.connect( user = 'm', password = '0', db = 'x', host = 'r', port = 3306, charset = 'utf8' ) con =connect.cur 阅读全文
posted @ 2021-10-30 07:08 myrj 阅读(133) 评论(0) 推荐(0)
摘要: if isinstance(item,MmzItem): data = {'xinxi':item['xinxi']} xinxia = data['xinxi'] print(len(xinxia),type(xinxia)) #print("ffffffffffffff",xinxi[0],xi 阅读全文
posted @ 2021-10-30 04:52 myrj 阅读(177) 评论(0) 推荐(0)
摘要: import pymysql import openpyxl import time def export_to_excel(worksheet, cursor, table): """ 将MySQL一个数据表导出到excel文件的一个表的函数 :param worksheet: 准备写入的exce 阅读全文
posted @ 2021-10-29 09:53 myrj 阅读(622) 评论(0) 推荐(0)
摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- import random import string # 随机整数: print random.randint(1,50) # 随机选取0到100间的偶数: print random.randrange(0, 10 阅读全文
posted @ 2021-10-26 06:16 myrj 阅读(117) 评论(0) 推荐(0)
上一页 1 ··· 121 122 123 124 125 126 127 128 129 ··· 189 下一页