文章分类 - 爬虫
摘要:# 目标:拉钩网的招聘信息from selenium.webdriver import Chromefrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.keys import Keys # 有键盘上所有键
        阅读全文
                
摘要:import asyncioimport aiofilesimport aiohttpasync def xin(url, data): headers = { 'Accept': '*/*', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 'Conne
        阅读全文
                
摘要:1. 打开播放视频 暂停 f12 xhr 刷新网址 找到 index.m3u8 复制 m3u8 在页面源代码查找 视频页 -> iframe(src) -> 视频播放 直接看iframe(src) 没办法右键的情况下怎么查看页面页面源代码 f12 -> Sources(源代码) -> ?url=ht
        阅读全文
                
摘要:网吧电影 91看剧 云播TV 琪琪布电影网 """1. 一般情况下,一个网页里想要显示出一个视频资源。<video>2. 几乎没有视频网站会在video中直接给出视频的地址 # <video src="http://www.baidu.com/苍老师.MP4"></video> # 用户体验极差,占
        阅读全文
                
摘要:from lxml import etreeimport asyncioimport aiofilesimport aiohttpimport csvasync def xin(url): async with aiohttp.ClientSession() as session: async wi
        阅读全文
                
摘要:pycharm 目录里面 鼠标左键点一下 按住shift 鼠标左键点一下 右键(用所选项目新建文件夹(155个项目)) F12 元素 ctrl+f 输入对应的xpath(//div[@class='section-box']/ul/li/a 这个xpath要写全 1of159 )
        阅读全文
                
摘要:# _*_ coding: utf-8 _*_import asyncioimport timefrom lxml import etreeimport aiohttpimport aiofilesimport requestsasync def download_one(url): headers
        阅读全文
                
摘要:# aiohttp , aiofilesimport asyncioimport aiohttpimport aiofilesasync def download(url): print("开始下载", url) file_name = url.split("/")[-1] # 相当于request
        阅读全文
                
摘要:import asyncioimport timeasync def func1(): print("我是func1") await asyncio.sleep(1) print("func1结束") return "func1的返回值"async def func2(): print("我是fun
        阅读全文
                
摘要:import asyncioimport time## async def func1():# print("我是func1")# await asyncio.sleep(1)# print("fun1结束")### async def func2():# print("我是func2")# awa
        阅读全文
                
摘要:from lxml import etree# 在函数外面打开一个文件f = open('data.csv', mode='w', encoding='utf-8')tree = etree.HTML(resp.text)# 查看页面源代码,找到唯一的tr_list = tree.xpath("//
        阅读全文
                
摘要:"""分析: 进程1. 从主页面中解析出详情页的url,从详情页中提取到图片的下载地址 进程2. 把拿到的地址,进行下载 队列:可以进行进程之间的通信"""import reimport requestsfrom multiprocessing import Process, Queue # Que
        阅读全文
                
摘要:可以经过数据库传递:MySQL、Oracle、SqlServer、SQLite、INFORMIX、Redis、MongoDB、HBase、Neo4J、CouchDB等
        阅读全文
                
摘要:from multiprocessing import Processfrom concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor # (进程池和线程池一摸一样,这是进程池导包)def func(name): for i
        阅读全文
                
摘要:from concurrent.futures import ThreadPoolExecutorimport time# 线程池-写法# 创建任务# def func(name):# for i in range(10):# print(name, i)## if __name__ == '__m
        阅读全文
                
摘要:线程=》员工 进程=》公司 from threading import Thread# # 单线程# def func(name):# for i in range(10):# print(name, i)# if __name__ == '__main__':# func("周杰伦")# func
        阅读全文
                
摘要:1. F12 - 网络 - XHR - 输入用户名,密码,验证码乱登录 2. 复制cURL(bash) - Convert curl commands to code (curlconverter.com) -
        阅读全文
                
                    
                
浙公网安备 33010602011771号