How to play with the world of the second generation of the lady is really good-looking
I don't know if there are little brothers and sisters who like cosplay, but today I'm sharing one about crawling cosplay pictures, emmm, first a few pictures to liven things up a bit!
Cough cough ..... Let's get down to business!
First, go to HalfDollar, click on COS, Hot Picks
Click F12 to see the Developer Tools window
Let's analyze the code with the first COS photo .... Uh... The second one looks good, better start with the second one.
Inside the red box is the html code of this image, then we click on the image to enter the page in normal way, we can see that this image is in higher resolution.
We compare it with the URL of the image from the previous HTML code
As you can see, 2X3 is the URL we get for the first COS photo when we first enter the page, and w650 is the URL we get after entering the COS photo detail page, and the difference found between them is the last paragraph in the URL code.
Other COS photos and so on
We continued to slide down the page we first entered and found that the page automatically updated when we scrolled to the end, we can be sure that the page used ajax technology, we go back to the top refresh screen, wait for the page to load and press F12 to open the developer tools, operate as shown in the figure
Click on XHR
We'll continue to scroll down and wait until the page updates to find the new barcode Click on the entry
In the Headers page down, see X-Reauested-With:XMLHttpRequest, indicating that it is an AJAX request, find the Query String Parameters, which is the data of the AJAX request, and in Preview you can see the data returned by Ajax.
Continuing to scroll down and let the page data update, I found a few new entries in Network
We compare the ajax request data for Query String Parameters and find that
grid_type:
flow
sort:
hot
3.tag_id:
399
These three data and other Network entries are the same, but since is not the same, and other entries compared to http://25853.xxxamong othersxxx These three numbers are irregular, where since in 25853 decimal data is 565, 523, 483, 428 (subject to the actual situation, for reference only), meaning we have to manually enter since data in the next image crawl
Implement the code to follow the private message [cos] to receive the source code of this article
effects