硬抓取 API [英] Hard Scraping API

查看:15
本文介绍了硬抓取 API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您导航到以下

搜索后.然后您会注意到对以下

如您所见,qzvalue,我不知道它是如何实现的,以便调用 API 并进行分页

有人知道如何调用该 API 并进行分页吗?

<块引用>

我得到的最好的是处理参数编码的 JS 函数位置

qi 值似乎最初取自源 HTML 中的 qk,并在其前面加上了 0-.

var qk = "ooooooooooooooooooo";//if(!(w == 790 && (h == 600 || h == 590)))qk = yj0IAlhpQGl9BLWmmmJ2WMuzofkYFis64bmU5/6mE8w=";

某些请求需要在您提出请求后递增.

您还需要另一个答案中给出的 cookie.

If you navigate to the following url and select Search By Country.

Then insert AE for Holder Country.

As the following:

After you press search. then you will notice an XHR call to the following API which is a POST request.

Here's it:

as you can see there's value for qz which i can't get how it's implemented in order to call the API and do pagination too.

May someone has a clue on how to call that API and do the pagination ?

The best which i reached is the JS functions location which handle the encoding of parameters here

I've already tried selenium with proxy rotation service but i got detected after retrieving some pages.

解决方案

The qz value is "encoded" JSON using LZString.compressToBase64

The qi value seems to be intially taken from qk in the source HTML with 0- prepended to it.

var qk = "ooooooooooooooooooo";

// if(!(w == 790 && (h == 600 || h == 590))) 

qk = "yj0IAlhpQGl9BLWmmmJ2WMuzofkYFis64bmU5/6mE8w=";

Certain requests require the number to be incremented after you make them.

You also need the cookie given in the other answer.

这篇关于硬抓取 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆