简体   繁体   English

移动到下一页时 url 不会改变

[英]url doesn't change when moving to the next page

Hi~ I just wanna get some data from page.嗨~我只是想从页面中获取一些数据。 I wanna navigate to the page programmatically.我想以编程方式导航到页面。 But this page's url doesn't change when I move to the next page.但是当我移动到下一页时,这个页面的 url 不会改变。 The site is http://goodauction.land.naver.com/auction/ca_list.php该网站是http://goodauction.land.naver.com/auction/ca_list.php

I don't know why How can I solve this??我不知道为什么我该如何解决这个问题??

each time you click the next page link, it posts data to server.每次单击下一页链接时,它都会将数据发布到服务器。 在此处输入图片说明

you can mimic the post use requests library.您可以模仿post use requests 库。

import requests, bs4
payload = {
        'lawsup':0,
        'lesson':0,
        'next_biddate1':'',
        'next_biddate2':'',
        'state':91,
        'b_count1':0,
        'b_count2':0,
        'b_area1':'',
        'b_area2':'',
        'special':0,
        'e_area1':'',
        'e_area2':'',
        'si':11,
        'gu':0,
        'dong':0,
        'apt_no':0,
        'order':'',
        'start':60,
        'total_record_val':850,
        'detail_search':'',
        'detail_class':'',
        'recieveCode':'',}
headers = {'User-Agent':'Mozilla/5.0', 
          'Referer':'http://goodauction.land.naver.com/auction/ca_list.php'}
r = requests.post('http://goodauction.land.naver.com/auction/ax_list.php', data=payload, headers=headers)
print(r.text)

although there are many fileds, but the page is in the start field: you can just post :虽然有很多文件,但页面在start字段中:您可以发布:

payload = {
        'state':91,
        'start':30,  # each page contains 30 record, next page +30 example: 0, 30, 60
        'total_record_val':850,}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM