手机
当前位置:查字典教程网 >脚本专栏 >python >python友情链接检查方法
python友情链接检查方法
摘要:本文实例讲述了python友情链接检查方法。分享给大家供大家参考。具体实现方法如下:#_*_coding:utf-8_*_#xiaohei....

本文实例讲述了python友情链接检查方法。分享给大家供大家参考。具体实现方法如下:

# _*_ coding:utf-8 _*_ #xiaohei.python.seo.call.me:) #win+python2.7.x import urllib2,re for i, line in enumerate(open('link.txt')): url_ = line.strip() print i,line html = urllib2.urlopen(url_).read() cou = html.count('360buy.com' or 'jd.com') if cou >= 0: print '有' else: print '没有' print "nn"

希望本文所述对大家的Python程序设计有所帮助。

【python友情链接检查方法】相关文章:

2款Python内存检测工具介绍和使用方法

python读取注册表中值的方法

python脚本实现查找webshell的方法

python调用shell的方法

python 快速排序代码

Python调用C/C++动态链接库的方法详解

Python列表推导式的使用方法

python 测试实现方法

python中stdout输出不缓存的设置方法

Python下singleton模式的实现方法

精品推荐
分类导航