Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem is that search results (specifically div <code>initial_browse_result</code>) are loaded dynamically via javascript. Scrapy receives the page before those actions, so there is no results yet there.</p> <p>Basically, you have two options here:</p> <ul> <li><p>try to simulate these js (XHR) requests in scrapy, see:</p> <ul> <li><a href="https://stackoverflow.com/questions/16390257/scrapping-ajax-pages-using-python">Scraping ajax pages using python</a></li> <li><a href="https://stackoverflow.com/questions/8550114/can-scrapy-be-used-to-scrape-dynamic-content-from-websites-that-are-using-ajax">Can scrapy be used to scrape dynamic content from websites that are using AJAX?</a></li> </ul></li> <li><p>use the combination of scrapy and <a href="http://selenium-python.readthedocs.org/en/latest/" rel="nofollow noreferrer">selenium</a>, or scrapy and <a href="http://wwwsearch.sourceforge.net/mechanize/" rel="nofollow noreferrer">mechanize</a> to load the whole page with the content, see:</p> <ul> <li><a href="https://stackoverflow.com/questions/10648644/executing-javascript-submit-form-functions-using-scrapy-in-python">Executing Javascript Submit form functions using scrapy in python</a></li> <li>this <a href="https://stackoverflow.com/a/16786934/771848">answer</a></li> </ul></li> </ul> <p>If you go with first option, you should analyze all requests going during the page load and figure out which one is responsible for getting the data you want to scrape.</p> <p>The second is pretty straightforward, but will definitely work - you just use other tool to get the page with loaded via js data, then parse it to scrapy items.</p> <p>Hope that helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload