python中 代码访问某个网站
2018-02-04 21:57
225 查看
import urllib def read_text(): quotes = open("/Users/Scarlett/Downloads/movie_quotes/movie_quotes.txt") contents_of_file = quotes.read() quotes.close() check_profanity(contents_of_file) def check_profanity(text_to_check): url = "http://www.wdylike.appspot.com/?q=" + text_to_check # print(url) connection = urllib.urlopen("http://www.wdylike.appspot.com/?q=" + "shit") output = connection.read() print(output) connection.close() read_text()
相关文章推荐
- 用Python访问有密码保护的网站----附代码样例
- python使用selenium自动访问网站运行hivesql并取数(版本一)
- python登陆asp网站页面的实现代码
- JavaScript统计网站访问次数的实现代码
- python实现爬取网站图片,视频动画到指定路径(附代码)
- python3使用多代理访问网站
- python脚本实现统计日志文件中的ip访问次数代码分享
- 根据 crazycode的建议,修改通过IP控制权限访问网站的部分代码
- 网站访问人数代码
- python访问网站
- selenium之python自动化测试系列:使用chrome或firefox的已存在的cookie访问网站
- python网站访问自动测试
- web监控:zabbix自动发现+python之pycur模块对网站访问质量监控
- php判断终端是手机还是电脑访问网站的思路及代码
- php判断终端是手机还是电脑访问网站代码
- 分享两个手机访问pc网站自动跳转手机端网站代码
- 分享:国外著名代码管理网站GitHub访问方式
- python模拟登陆后用户访问网站
- 【从0开始Tornado建站】0.9版本python网站代码开源--持续更新中
- Python之——网站访问流量统计