Hi I'm facing a problem , I'm calling a website using jQuery AJAX to Scrape data from it , so there are 300 links which I want to scrape but the site shows only 50 at a time so we have to scroll down to load all those links can Someone Please Help me ?
var baseURL = "https://hr.myu.umn.edu/psc/hrprd/EMPLOYEE/HRMS/c/HRS_HRAM_FL.HRS_CG_SEARCH_FL.GBL?Page=HRS_APP_JBPST_FL&Action=U&SiteId=1&FOCUS=Applicant&JobOpeningId=";
var appendURL = "&PostingSeq=1";
var result = {};
jQuery.ajax({
async: false,
type: 'GET',
url: 'https://hr.myu.umn.edu/psc/hrprd/EMPLOYEE/HRMS/c/HRS_HRAM_FL.HRS_CG_SEARCH_FL.GBL?Page=HRS_APP_SCHJOB_FL&ACTION=U&FOCUS=Applicant&SiteId=1&',
success: function(resp) {
console.log('ajax success');
var content = $(".ps_box-grid");
var objDiv = document.getElementById("win0divHRS_AGNT_RSLT_I$grid$0"); objDiv.scrollTop = objDiv.scrollHeight;
for (var i = 0; i < jQuery('[class="ps_box-edit psc_disabled psc_has_value psc_num"] [class="ps_box-value"]', resp).length; i++) {
结果[baseURL + jQuery('[class="ps_box-edit psc_disabled psc_has_value psc_num"] [class="ps_box-
value"]', resp)[i].innerText + appendURL] = {}
}
},
});
result;
Here's a Link related to a similar problem answered on stack overflow:
https://stackoverflow.com/questions/34239525/scroll-to-bottom-of-div-using-jquery-if-ajax-returns-success/65727077?noredirect=1#comment116210292_65727077