zoukankan      html  css  js  c++  java
  • 爬虫相关笔记

    代理相关

    1.重试
    2.代理可用时长判断

    验证码相关

    原理

    rectObject = object.getBoundingClientRect();
    

    该方法会返回与该元素相关的CSS边框集合。

    例如大众点评的执行代码

    $("#yodaBox").getBoundingClientRect()
    

    获取信息

    {
      "x": 17,
      "y": 245.5,
      "width": 33,#'元素宽度'
      "height": 33, #'元素高度'
      "top": 245.5, #'元素顶部相对于视口顶部的距离'
      "right": 50,#'元素右边相对于视口左边的距离'
      "bottom": 278.5,#'元素底部相对于视口顶部的距离'
      "left": 17 #'元素左边相对于视口左边的距离'
    }
    

    滑动验证码

    1.滑块移动距离=终点坐标-起点坐标

    2.起点坐标
    滑块的左边到视口左边的距离-图片的左边到视口左边的距离
    3.终点坐标
    比较完整图和缺口图,计算像素不一样的地方。

    参考资料

    https://www.cnblogs.com/lmx123/p/9246215.html
    https://developer.mozilla.org/zh-CN/docs/Web/API/Element/getBoundingClientRect
    
  • 相关阅读:
    大数据总结
    spark_streaming_微批量处理
    spark_sql_解析器
    spark_sql_函数
    spark-sql-04-spark连接hive的几种方式
    spark-sql-04-on_hive
    spark-sql-04-hive
    CF550C Divisibility by Eight
    CF489C Given Length and Sum of Digits...
    CF550A Two Substrings
  • 原文地址:https://www.cnblogs.com/c-x-a/p/12077960.html
Copyright © 2011-2022 走看看