step1. 找一个单词数据库
这里有一个13万个单词的
http://download.csdn.net/detail/u011004567/9675906
新建个mysql数据库words,导入words里面就行
step2.找个查询接口
这里我用的是http://apistore.baidu.com/astore/serviceinfo/27586.html
step3. 执行Python脚本
# -*- coding: utf-8 -*-
'''
域名注册查询
'''
__author__ = 'Jimmy'
from sqlalchemy import Column, String,Integer, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
import requests
import json
from html.parser import HTMLParser
request_failure = []
domain_available = []
def writeToText(list,fn):
file = open(fn, 'w')
file.write(str(list))
file.close()
class bodyJSON(HTMLParser):
tag = False
def handle_starttag(self, tag, attr):
if tag == 'body':
self.tag = True
def handle_endtag(self, tag):
if tag == 'body':
self.tag = False
def handle_data(self, data):
if self.tag:
self.data = data
def getJSON(self):
return self.data
Base = declarative_base()
class Words(Base):
# 表的名字:
__tablename__ = 'words'
# 表的结构:
ID = Column(Integer(), primary_key=True)
word = Column(String(100))
exchange = Column(String(1000))
voice = Column(String(1000))
times = Column(Integer())
# 初始化数据库连接:
engine = create_engine('mysql+mysqlconnector://root:846880@localhost:3306/words')
# 创建DBSession类型:
DBSession = sessionmaker(bind=engine)
# 创建Session:
session = DBSession()
# 创建Query查询,filter是where条件,最后调用one()返回唯一行,如果调用all()则返回所有行:
words = session.query(Words).filter(Words.ID).all()
def searchInaaw8(words):
length = len(words)
print('====开始搜索...=====共%d个单词' %length)
for i in range(0,length):
word = words[i]
url = 'http://www.aaw8.com/Api/DomainApi.aspx"color: #ff0000">step4:放到阿里云就可以搞事情啦
以上所述是小编给大家介绍的Python批量查询域名是否被注册过,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
标签:
python查询域名是否注册过
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“Python批量查询域名是否被注册过”评论...
更新动态
2026年04月17日
2026年04月17日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]
