How to select "Load more results" button when scarping using Python & lxml

Taranjeet

I am scraping a webpage. The webpage consists of 50 entries. After 50 entries it gives a Load more reults button. I need to automatically select it. How can I do it. For scraping I am using Python, Lxml.

Jan Vlcinsky

Even JavaScript is using http requests to get the data, so one method would be to investigate, what requests are providing the data when user asks to "Load more results" and emulate these requests.

This is not traditional scraping, which is based on plain or rendered html content and detecting further links, but can be working solution.

Next actions:

  • visit the page in Google Chrome or Firefox
  • press F12 to start up Developer tools or Firebug
  • switch to "Network" tab
  • click "Load more results"
  • check, what http requests have served data for loading more results and what data they return.
  • try to emulate these requests from Python

Note, that the data do not necessarily come in HTML or XML form, but could be in JSON. But Python provide enough tools to process this format too.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to select "Load more results" button when scarping using Python & lxml

From Dev

How can I python twitter crawling(scarping) several keyword

From Dev

My iOS7 app crashes when I add an extra row to my UITableViewController dedicated to my load more results feature

From Dev

How do I select an element with the exact class using cssselect in lxml?

From Dev

How do I select all check box when I click on Select button using jQuery

From Dev

How to select a button and delete a grandparent div of that button when the button is clicked?

From Dev

python3 lxml how to find node when prefix is empty?

From Dev

How to create a soap request using Python ElementTree, LXML or similar library

From Dev

How to add multiple SubElement using lxml.etree? (python)

From Dev

Using Selenium in Python to click/select a radio button

From Dev

How to pre-select radio group button when "name" attribute has "[]" brackets in it using jQuery?

From Dev

issue with load more results in php ajax

From Dev

issue with load more results in php ajax

From Dev

ZK - Dynamically load more results categorically

From Dev

How to select a button on popup using Protractor

From Dev

How to select this radio button using Robot Framework?

From Dev

How to de-select a button using JavaScript

From Dev

removing elements using python and lxml

From Dev

removing elements using python and lxml

From Dev

LXML using XPath and ETXPath in Python

From Dev

How to select radio button with Selenium and Python

From Dev

how to select a radio button in selenium python?

From Dev

How to reset etree using lxml

From Dev

How to merge dictionaries data after Scarping from beautiful soup

From Dev

how to parse iframe in lxml in python?

From Dev

lxml parsing with python: how to with objectify

From Dev

How to rename a node with Python LXML?

From Dev

Python, How to use lxml XPath?

From Dev

lxml parsing with python: how to with objectify

Related Related

  1. 1

    How to select "Load more results" button when scarping using Python & lxml

  2. 2

    How can I python twitter crawling(scarping) several keyword

  3. 3

    My iOS7 app crashes when I add an extra row to my UITableViewController dedicated to my load more results feature

  4. 4

    How do I select an element with the exact class using cssselect in lxml?

  5. 5

    How do I select all check box when I click on Select button using jQuery

  6. 6

    How to select a button and delete a grandparent div of that button when the button is clicked?

  7. 7

    python3 lxml how to find node when prefix is empty?

  8. 8

    How to create a soap request using Python ElementTree, LXML or similar library

  9. 9

    How to add multiple SubElement using lxml.etree? (python)

  10. 10

    Using Selenium in Python to click/select a radio button

  11. 11

    How to pre-select radio group button when "name" attribute has "[]" brackets in it using jQuery?

  12. 12

    issue with load more results in php ajax

  13. 13

    issue with load more results in php ajax

  14. 14

    ZK - Dynamically load more results categorically

  15. 15

    How to select a button on popup using Protractor

  16. 16

    How to select this radio button using Robot Framework?

  17. 17

    How to de-select a button using JavaScript

  18. 18

    removing elements using python and lxml

  19. 19

    removing elements using python and lxml

  20. 20

    LXML using XPath and ETXPath in Python

  21. 21

    How to select radio button with Selenium and Python

  22. 22

    how to select a radio button in selenium python?

  23. 23

    How to reset etree using lxml

  24. 24

    How to merge dictionaries data after Scarping from beautiful soup

  25. 25

    how to parse iframe in lxml in python?

  26. 26

    lxml parsing with python: how to with objectify

  27. 27

    How to rename a node with Python LXML?

  28. 28

    Python, How to use lxml XPath?

  29. 29

    lxml parsing with python: how to with objectify

HotTag

Archive