python
改天
攻城狮
展开
-
python 使用浏览器打开某个页面后关闭
# -*- coding: utf-8 -*import webbrowser as webimport timeimport osurllist=[ 'https://blog.csdn.net/weixin_41783077/article/details/82983127', 'https://blog.csdn.net/weixin_41783077/article/details/82990355']for j in range(0,1):#设置循环的总次数 .原创 2021-01-05 13:48:48 · 1000 阅读 · 1 评论 -
python xls
import requestsimport xlwtfrom bs4 import BeautifulSoupurl="https://blog.csdn.net/LI_AINY"headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36'}ss=Nonetry: r=.转载 2021-01-05 13:45:32 · 71 阅读 · 0 评论 -
python添加cdsn文章的阅读量
import requestsimport urllib.request as urfrom bs4 import BeautifulSoupurl="https://blog.csdn.net/qq_41896729?spm=1001.2014.3001.5343"headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0..原创 2021-01-05 13:38:59 · 124 阅读 · 0 评论 -
python windown pip的安装使用
windows 安装: 保证计算机联网直接使用cmd 执行 python -m pip install -U pippip使用详解2.1 pip安装包pip install 所需安装包名字12.2 pip查看已安装的包pip show --files 安装包名字12.3 pip检查哪些包需要更新pip list --outdate12.4 pip升级包 pip install --upgrade 安装包名字 12.5 pip..原创 2021-01-05 13:35:40 · 107 阅读 · 0 评论 -
py 学习
import urllib2list = ['html', 'js', 'css', 'python']for i in list: print ("序号:%s 值:%s" % (list.index(i) + 1, i))def test(): url = 'https://blog.csdn.net/qq_41896729/article/details/108758784' req = urllib2.Request(url) req.add_head.原创 2020-12-31 09:49:48 · 108 阅读 · 0 评论