1

i am trying to get pagination data using scraping. next page data are retrieved using on-click event, is it possible to retrieve?

this is my URL which i used for scraping : http://www.esrb.org/ratings/search.jsp

this is the code of next page link :

<input type="submit" onmousedown="restorePreEdits()" onclick="javascript:scrollPage('1');return false;" id="nextPage" value="&gt;&gt;" name="nextPage">
Badal Solanki
  • 412
  • 3
  • 17
  • Find out what the click event does. Emulate it. Or use a scraping (or "automation") tool with JavaScript / client emulation. – user2864740 Sep 19 '15 at 07:53
  • have a look at target site to understand how it's working then try to automate same thing with at your end. – Ravish Sep 19 '15 at 08:14

1 Answers1

0

If you look at the website structure and the Javascript, you would notice that on each click on the next/prev button, the value of the offset input is adjusted from the form below, and then the form is submitted:

<form id="search" action="search.jsp" method="POST">
    .
    .
    .
    <input type="hidden" name="offset" value="50">
    .
    .
    .
</form>

All you need to do for scrapping information from the site is to simulate the submission of this form.

You can refer to this thread on how to send POST requests using cURL and PHP.

Community
  • 1
  • 1
Matt
  • 881
  • 6
  • 20