摘要: https://curl.trillworks.com/ 阅读全文
posted @ 2020-03-02 09:34 myrj 阅读(117) 评论(0) 推荐(0)
摘要: aa=wd.find_elements_by_xpath('//a') for a in aa: print(a.text) #显示所有A标签中文本 aa=wd.find_elements_by_xpath('//a') for a in aa: print(a.get_attribute("hre 阅读全文
posted @ 2020-02-24 19:29 myrj 阅读(141) 评论(0) 推荐(0)
摘要: 1、sqlite3数据库select * from QG order by random() limit 6 以下显示前10条记录 2、SQL Server数据库select top 10 * from table_name; 3、DB2数据库select * from table_name fet 阅读全文
posted @ 2020-02-24 10:52 myrj 阅读(259) 评论(0) 推荐(0)
摘要: 替换换行符: update qgnews set article_url=REPLACE(article_url,char(10),'') 替换回车符: update qgnews set article_url=REPLACE(article_url,char(13),'') 阅读全文
posted @ 2020-02-21 16:01 myrj 阅读(112) 评论(0) 推荐(0)
摘要: from selenium.webdriver.chrome.options import Options from selenium import webdriver wd = webdriver.Chrome()#打开有界面浏览器 wd.maximize_window()#最大化浏览器 wd.e 阅读全文
posted @ 2020-02-19 10:04 myrj 阅读(805) 评论(0) 推荐(0)
摘要: 方法一:import sysimport osBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))sys.path.append(BASE_DIR)方法二:import sys,osprint(sys.path# 阅读全文
posted @ 2020-02-18 16:53 myrj 阅读(125) 评论(0) 推荐(0)
摘要: {accept:application/json, text/plain, */*,accept-encoding:gzip, deflate, br,accept-language:zh-CN,zh;q=0.9,cookie:WEIBOCN_WM=3349; H5_wentry=H5; backU 阅读全文
posted @ 2020-02-18 11:32 myrj 阅读(2559) 评论(0) 推荐(0)
摘要: import re ab='''ms: [["", "\u7acb\u5373\u4e0b\u8f7d"], ["", "\u5207\u6362\u81f3\u4e2a\u4eba\u8d26\u53f7\u4e0b\u8f7d"],''' ab=re.sub(r' +','',ab) #将ab中 阅读全文
posted @ 2020-02-17 15:35 myrj 阅读(152) 评论(0) 推荐(0)
摘要: pip install python.docx from docx import DocumentDoc = Document() 解释:from 从 docx这个文件中,导入一个叫Document的一个东西,Document是文档的意思,所以它是对word文档进行操作的一个玩意. 在下面Doc = 阅读全文
posted @ 2020-02-17 07:14 myrj 阅读(195) 评论(0) 推荐(0)
摘要: import requests rr=requests.get("https://api.github.com",auth=('user','pass')) print(rr.status_code) print(rr.headers['content-type']) 结果: RESTART: D: 阅读全文
posted @ 2020-02-16 18:19 myrj 阅读(140) 评论(0) 推荐(0)