EKsumic's Blog

let today = new Beginning();

Click the left button to use the catalog.

OR

关于pcrdfans的网页元素分析

//获得数量

//20
$('#battle_chara_select > div > div:nth-child(1) > div.ant-collapse-content.ant-collapse-content-active > div').children().length;
//17
$('#battle_chara_select > div > div:nth-child(2) > div.ant-collapse-content.ant-collapse-content-active > div').children().length;
//18
$('#battle_chara_select > div > div:nth-child(3) > div.ant-collapse-content.ant-collapse-content-active > div').children().length;


//获得坐标


//第一框
$('#battle_chara_select > div > div:nth-child(1) > div.ant-collapse-content.ant-collapse-content-active > div > div:nth-child(1)').css('background-position');

//第二框
$('#battle_chara_select > div > div:nth-child(2) > div.ant-collapse-content.ant-collapse-content-active > div > div:nth-child(1)').css('background-position');

//第三框
$('#battle_chara_select > div > div:nth-child(3) > div.ant-collapse-content.ant-collapse-content-active > div > div:nth-child(1)').css('background-position');

//通过坐标截图,然后比对图,获得相似度最高的元素的(选择器值)

//点击对应角色

一般项:

<div style="width: 50px; height: 50px; background-image: url(&quot;/static/sprites/charas.png?t=20200831&quot;); background-size: 622px; background-position: -260px -156px;"></div>

 

This article was last edited at 2020-09-03 04:00:51

* *