title: web scraping with scrapy. how to define an xpath wildcard for numbers?
body: <p>What I'm trying to do is grab the names of the different employment opportunities from the <a href="http://careers.stackoverflow.com/jobs">stackoverflow careers subsection</a>.</p>
  
  <p>the xpath of the elements I want, according to my chrome plugin which magically tells you the xpath for a selected element, looks like this:</p>
  
  <pre><code>//*[@id="content"]/div[1]/div[1]/div[2]/div[1]/div[1]/h3/a
  
  //*[@id="content"]/div[1]/div[1]/div[2]/div[1]/div[2]/h3/a
  
  //*[@id="content"]/div[1]/div[1]/div[2]/div[1]/div[3]/h3/a
  
  //*[@id="content"]/div[1]/div[1]/div[2]/div[1]/div[4]/h3/a
  </code></pre>
  
  <p>I can pull out the titles individually with this command to the <a href="http://doc.scrapy.org/en/latest/intro/tutorial.html" rel="nofollow">scrapy shell</a>:</p>
  
  <pre><code>response.xpath('//*[@id="content"]/div[1]/div[1]/div[2]/div[1]/div[4]/h3/a').extract()
  </code></pre>
  
  <p>and so on, by switching the number of the last div[] element. </p>
  
  <p>My question is, how can I make a generalizable command that will extract all of the titles on a page? </p>
  
  <p>I had a look on <a href="http://www.w3schools.com/xsl/xpath_syntax.asp" rel="nofollow">w3schools</a> about xpath syntax but I didn't see anything about a kind of wildcard for numbers, is that such a thing? Is this a reasonable way of extracting all the different names of jobs?</p>
  
  <p>The html looks like this:</p>
  
  <pre><code>[u'&lt;a class='job-link' href='/jobs/92881/software-engineer-java-m-w-advitec-informatik-gmbh?a=v9gjNYx3zGg&amp;amp;so=i' title='Software Engineer JAVA (m/w)'&gt;Software Engineer JAVA (m/w)&lt;/a&gt;']
  </code></pre>
  
  <p>which is not completely useless, i could work with that, and then extract it further with jsoup or something, but i need it for all the jobs and not just one, you know?</p>
  
  <p>also... is there a way in the scrapy shell to make them appear with a newline after?</p>