python day four

今日内容:
一 Selenium请求库

 

一 Selenium请求库
1.什么是selenium?
selenium是一个自动测试工具,它可以帮我通过代码
去实现驱动浏览器自动执行相应的操作。
所以我们也可以用它来做爬虫。

2.为什么要使用selenium?
主要使用selenium的目的是为了跳过登录验证。

3.安装与使用
- 下载驱动器:
http://npm.taobao.org/mirrors/chromedriver/2.38/

- 下载selenium请求库
- 修改下载源为清华源
- D:\python36\Lib\site-packages\pip\models\index.py
- PyPI = Index('https://pypi.tuna.tsinghua.edu.cn/simple')

- pip3 install selenium 或 settings中安装

- 安装谷歌浏览器
...

 

 

from selenium import webdriver
import time
webdriver.Chrome()
time.sleep[5]
driver.close()

 

转载于:https://www.cnblogs.com/liusiyu-0929/p/11099749.html

马丁路德金的"I have a dream"节选存放在"freedom.txt"中: I have a dream that one day this nation will rise up, live up to the true meaning of its creed: “We hold these truths to be self-evident; that all men are created equal.” I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slave-owners will be able to sit down together at the table of br otherhood. I have a dream that one day even the state of Mississippi, a state sweltering with th e heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice. I have a dream that my four children will one day live in a nation where they will no t be judged by the color if their skin but by the content of their character. I have a dream today. I have a dream that one day down in Alabama with its governor having his lips drippin g with the words of interposition and nullification, one day right down in Alabama li ttle black boys and black girls will be able to join hands with little white boys and white girls as sisters and brothers. I have a dream today. I have a dream that one day every valley shall be exalted, every hill and mountain sh all be made low, the rough places will be made plain, and the crooked places will be made straight, and the glory of the Lord shall be revealed, and all flesh shall see i t together. 编程实现词汇表,计算每一个单词出现的次数,大小写不区分,输出到"dic.txt" 文件保存。 将源程序和运行结果制作图片提交到答题处。
06-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值