1

i try to scrape a website, for choosing every Category, i need to check a check box

<ul class="mvSrcLk">
   <li>
      <label class="mvNavSel mvNavLvl1">
      Marché frais
      <input type="checkbox" value="f/1/1p" name="selectedNavigationCategoryPath">
</label>
</li>
<li>
<label class="mvNavSel mvNavLvl1">
Épicerie sucrée
<input type="checkbox" value="f/1/1o" name="selectedNavigationCategoryPath">
</label>

how can do this by Scrapy, i read this but it doesn't helped me

Community
  • 1
  • 1
parik
  • 2,313
  • 12
  • 39
  • 67

1 Answers1

2

Is the code part of a <form>? If so then you may need to make a request with the "check box selected", as well as anything else required for the form submission, and then scrape what you need from that request.

If however, the checkbox executes some sort of Javascript that changes the HTML content dynamically, then you'll need to use other tools in combination with Scrapy. There are projects that combine Scrapy and Selenium or Splash that should execute Javascript and return the response.

References

Community
  • 1
  • 1
notorious.no
  • 4,919
  • 3
  • 20
  • 34
  • Yes the code is the part of a form, my question is how can i set a value of check box? i have no problem with scrape dynamic pages – parik May 18 '16 at 09:53