
crawler
文章平均质量分 54
crawler
Carry_NJ
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
google recaptcha 验证
http://www.apl.com/ebusiness/schedules在提交的时候会有一个参数:g-recaptcha-response 需要根据网站的siteKey 去谷歌验证获取主要代码在这:$(function () { $("#searchSchedules").click(function (event) { if (typeof grecap...原创 2020-04-01 17:09:39 · 1047 阅读 · 0 评论 -
有营养的文章
https://www.cnblogs.com/alan-babyblog/p/5527934.html原创 2020-03-11 10:51:41 · 163 阅读 · 0 评论 -
Scrapy 对接 mysql
从数据库获取数据import scrapyimport pymysqlfrom scrapy.conf import settingsclass CoscoSailingScheduleSpiderSpider(scrapy.Spider): name = 'cosco_sailing_schedule_spider' allowed_domains = ['eli...原创 2020-03-18 10:51:44 · 824 阅读 · 1 评论 -
scrapy 中日志的使用
1. settings 设置2. spiders 中直接 import logging 然后 直接调用import logginglogging.info('这是INFO')3.控制台不再输出日志,全都保存到日志文件中了原创 2020-02-19 12:13:54 · 500 阅读 · 0 评论 -
Scrapy 与 requests库中 cookie相关操作
爬取过程中经常会遇到多个请求需要同一个session(cookies)的操作。对于requests 库来说,使用较为简单:import requestssession = requests.Session()def get_page(url, model): try: data = { ... } if m...原创 2019-06-04 14:58:14 · 1301 阅读 · 1 评论 -
Scrapy中selenium的使用
场景1:项目中有多个爬虫时,将driver对象的初始化放在各个spider中#!/usr/bin/env python# -*- coding: UTF-8 -*-'''@author: carry@time: 2019/6/19 15:56@desc:'''import scrapyfrom selenium import webdriverfrom scrapy imp...原创 2019-06-19 16:20:40 · 1302 阅读 · 0 评论 -
selenium 方法汇总
技巧1: 有时候浏览器看到的源代码和selenium返回不一样 。可能是多个frame 或者多个windows 多层框架或窗口的定位: driver.switch_to_frame()# 括号内是 iframe 的id 或者name 或者 index driver.switch_to.parent_frame() # 切回到...原创 2019-06-19 11:13:16 · 335 阅读 · 0 评论 -
python url去重
"""@Time : 2018/12/10 19:39@Author : Carry@File : SimpleHash.py"""import redisfrom hashlib import md5class SimpleHash(object): def __init__(self, cap, seed): self.cap = c...原创 2018-12-15 10:31:16 · 341 阅读 · 0 评论 -
字体反爬
1.页面看到的文字实际由另一个字经过字体库映射而得2.网页会在加载的时候载入字体库 (可能有多个字体库),将此字体下载下来,通过font creator(字体工具)打开可以看到对应表,遍找到了映射关系。(笨方法到这直接对着写map就可以了)3.用python 将.woff的字体文件 转成 XML 读取其中的映射。下图为第一层映射,根据code 可以得到 name...原创 2018-09-06 09:23:34 · 1494 阅读 · 1 评论