title: Selecting XPATH of all Divs that contains certain attribute using Scrapy
body: <p>Assume given HTML</p>
  
  <pre><code>&lt;div class="class_A"&gt;
     &lt;div class="class_B" index=value &gt;
         ...a lot going on...
     &lt;/div&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>If know I can select all divs by their class name as:</p>
  
  <pre><code>'//div[contains(@class,'class_B')]'
  </code></pre>
  
  <p>But I want to access divs with a specific attribute such as <code>index</code> (with any value).</p>
  
  <p><strong>Just to clarify:</strong> We have to select div that has <code>index</code> as an attribute, not by a specific value of <code>index</code>.
  Any help would highly be appreciated!</p>