Sending an jquery AJAX GET request with Python request library

后端 未结 2 1977
暖寄归人
暖寄归人 2021-01-03 07:10

I have a website I need to scrape and it is using jquery AJAX function to get information from the server. I have been investigating the code for a while and I successfully

2条回答
  •  旧巷少年郎
    2021-01-03 07:48

    BAD REQUEST 400 means that the server was unable to understand or process your request (the data you sent via AJAX).

    Since you're using GET method in AJAX, I would give a try to traditional url with query string:

    var request = 'part_number=1234';
    $.get('http://your.website/your_server_file?'+request, function(data){
        // handle the server response (data) here ...
    });
    

提交回复
热议问题