用python3爬虫

作者: Timmyk | 来源:发表于2017-10-17 21:22 被阅读7次

识别网站所用技术

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

相关文章

网友评论

    本文标题:用python3爬虫

    本文链接:https://www.haomeiwen.com/subject/utjjuxtx.html