会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
bsde
博客园
首页
新随笔
联系
订阅
管理
2020年9月21日
python编写web目录扫描器
摘要: #!/usr/bin/python3 import requests import sys import queue import threading class Dirscan(threading.Thread): def __init__(self,q): super(Dirscan, self
阅读全文
posted @ 2020-09-21 21:51 bsde
阅读(349)
评论(0)
推荐(0)
2020年9月18日
python多线程爬虫爬取nipic(昵图网)多个页面旅游海报并下载
摘要: 写代码之前先看页面分析,找出图片地址的正则表达式 随便找两张图片进行元素分析 <img src="http://pic213.nipic.com/pic/20190419/6970666_050901192080_4.jpg" alt="西藏"> <img src="http://pic215.ni
阅读全文
posted @ 2020-09-18 17:03 bsde
阅读(761)
评论(0)
推荐(0)
2020年9月13日
python多线程爬取爱春秋课程名称及教师名
摘要: import requestsimport jsonimport _threadimport timedef spider(data): url='https://www.ichunqiu.com/courses/ajaxCourses' headers={'User-agent':'xixi sp
阅读全文
posted @ 2020-09-13 01:05 bsde
阅读(184)
评论(0)
推荐(0)
2020年9月12日
python爬取i春秋帖子名称
摘要: import requestsfrom bs4 import BeautifulSoupimport reurl='https://bbs.ichunqiu.com/portal.php'headers={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win
阅读全文
posted @ 2020-09-12 20:02 bsde
阅读(164)
评论(0)
推荐(0)
2020年9月11日
python爬虫模块简单使用 requests,re
摘要: import requestsimport reheaders={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0'}url='https://bbs.ichunq
阅读全文
posted @ 2020-09-11 22:49 bsde
阅读(226)
评论(0)
推荐(0)
2020年9月8日
python数据库查询
摘要: import pymysqlccon=pymysql.connect( host='127.0.0.1', user='root', password='password', port=3306, db='sys', charset='utf8')cur=ccon.cursor()sql='sele
阅读全文
posted @ 2020-09-08 00:52 bsde
阅读(476)
评论(0)
推荐(0)
2020年9月6日
python网络编程
摘要: 服务端 import socketsever=socket.socket(socket.AF_INET,socket.SOCK_STREAM)host=socket.gethostname()port=1234sever.bind((host,port))sever.listen(5)while T
阅读全文
posted @ 2020-09-06 20:34 bsde
阅读(174)
评论(0)
推荐(0)
2020年9月3日
python使用queque实现简单ip地址遍历
摘要: import threadingimport queueclass mythread(threading.Thread): def __init__(self,n): super(mythread, self).__init__() self.n=n def run(self): while not
阅读全文
posted @ 2020-09-03 23:21 bsde
阅读(406)
评论(0)
推荐(0)
python多线程
摘要: 创建多线程的方法 1.通过_threads模块创建多线程(了解即可): import _threadimport timedef speak(): print('去你大爷')def main():#创建线程函数 _thread.start_new_thread(speak,()) _thread.s
阅读全文
posted @ 2020-09-03 22:56 bsde
阅读(175)
评论(0)
推荐(0)
公告