qq_21138051
码龄11年
关注
提问 私信
  • 博客:3,207
    3,207
    总访问量
  • 3
    原创
  • 1,486,274
    排名
  • 2
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:江西省
  • 加入CSDN时间: 2014-09-22
博客简介:

qq_21138051的博客

查看详细资料
个人成就
  • 获得1次点赞
  • 内容获得0次评论
  • 获得7次收藏
创作历程
  • 5篇
    2018年
TA的专栏
  • 未完成
  • python
    1篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

Python中 '\r' 的实际应用

1. 知识储备\r 表示将光标的位置回退到本行的开头位置\b 表示将光标的位置回退一位在 python 语言中, 使用 print 打印输出时,默认是会进行换行的。如何让其不换行呢?在 python 2.x 中的语法是在 print 语句的末尾添加逗号,例如 print x, ;或者使用 sys.stdout.write() 对标准输出进行重定向,如此文所示 https://segme...
转载
发布博客 2018.11.12 ·
657 阅读 ·
1 点赞 ·
0 评论 ·
2 收藏

selenium操作

selenium模拟手机登陆:from selenium import webdriverimport time""" selenium模拟手机登陆 """# 设置mobilesetting={"deviceName": "iPhone X"}chrome_options = webdriver.ChromeOptions() # 选项chrome_options.add_...
原创
发布博客 2018.11.08 ·
231 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

随机请求User-Agent

fake-useragentpython安装pip install fake-useragent使用方法:from fake_useragent import UserAgentua = UserAgent()ua.ie# Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US);ua.msie# Mozil...
转载
发布博客 2018.11.07 ·
464 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

python 数据库操作 使用连接池

# 操作数据库存储数据是 IO 操作,IO操作比较消耗时间,所以可以异步操作from twisted.enterprise import adbapifrom pymysql.cursors import DictCursorfrom pymysqlclass JianshuTwistedSpiderPipeline(object): def __init__(self):...
原创
发布博客 2018.11.06 ·
1202 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Selenium 处理 Farme 框架代码

一,有的网页我们使用requests请求,返回的内容没有我们要的信息,然后你会发现返回的代码跟网页源代码是一毛一样(里头根本就没有我们想要的信息),而信息都在框架源代码中(网页内的网页),这时候我们想要获取信息就换方法。二,使用Selenium里的switch_to.frame()方法:跳转到指定的框架from selenium import webdriverfrom lxml impor...
原创
发布博客 2018.10.31 ·
598 阅读 ·
0 点赞 ·
0 评论 ·
4 收藏