用python3爬虫

识别网站所用技术

python3.6 安装builtwith模块  

import builtwith

builtwith.parse('https://ggstudy.herokuapp.com/')

寻找网站所有者

pip install python-whois


import whois

whois.whois('https://ggstudy.herokuapp.com')

下载网页

import urllib.request

urllib.request.urlopen(url).read().decode('utf-8')

查询域名是否被注册

import urllib.request

req= urllib.request.urlopen('http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=ggstudy.herokuapp.com')

print(req.read().decode('utf-8'))

网页解析

#python2为 urlparse

import urllib.parse

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容