会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
myrj
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
182
183
184
185
186
187
188
189
下一页
2020年2月21日
SELECT SQL
摘要: 替换换行符: 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
阅读(126)
评论(0)
推荐(0)
2020年2月19日
python chrome
摘要: 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
阅读(819)
评论(0)
推荐(0)
2020年2月18日
python 导入模块
摘要: 方法一: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
阅读(152)
评论(0)
推荐(0)
python pycharm 正则表达式批量替换
摘要: {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
阅读(2577)
评论(0)
推荐(0)
2020年2月17日
python正则表达式应用
摘要: 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
阅读(159)
评论(0)
推荐(0)
python 操作word
摘要: pip install python.docx from docx import DocumentDoc = Document() 解释:from 从 docx这个文件中,导入一个叫Document的一个东西,Document是文档的意思,所以它是对word文档进行操作的一个玩意. 在下面Doc =
阅读全文
posted @ 2020-02-17 07:14 myrj
阅读(211)
评论(0)
推荐(0)
2020年2月16日
python requests
摘要: 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
阅读(147)
评论(0)
推荐(0)
python "format"
摘要: urls=[f'https://www.baidu.com/?page={page}' for page in range(1,5)] #F f大小写都可以 print(urls) page=10 url='https://www.baidu.com/?page={}'.format(page) p
阅读全文
posted @ 2020-02-16 16:43 myrj
阅读(206)
评论(0)
推荐(0)
python 元组推导式
摘要: >>> b=(page for page in range(10))>>> print(b)<generator object <genexpr> at 0x0000000002EE61C8>>>> list(b) #只能生成一次[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]>>> l
阅读全文
posted @ 2020-02-16 16:32 myrj
阅读(467)
评论(0)
推荐(0)
python 列表指导式
摘要: >>> a=[page for page in range(10)]>>> print (a)[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]>>> a=[page*2 for page in range(10)]>>> print(a)[0, 2, 4, 6, 8, 10, 12, 1
阅读全文
posted @ 2020-02-16 16:24 myrj
阅读(168)
评论(0)
推荐(0)
上一页
1
···
182
183
184
185
186
187
188
189
下一页
公告