Receiving and empty list when trying to make a webscraper to parse websites for links
<p>I was reading <a href="http://docs.python-guide.org/en/latest/scenarios/scrape/" rel="nofollow">this</a> website and learning how to make a webscraper with <code>lxml</code> and `Requests. This is the webscraper code:</p>

<pre><code>from lxml import html
import requests

web_page = requests.get('http://econpy.pythonanywhere.com/ex/001.html')

tree = html.fromstring(web_page.content)


buyers = tree.xpath('//div[@title="buyer-name"]/text()')
prices = tree.xpath('//span[@class="item-price"]/text()')

print "These are the buyers: ", buyers
print "And these are the prices: ", prices 
</code></pre>

<p>It works as intended, but when I try to scrape <a href="https://www.reddit.com/r/cringe/" rel="nofollow">https://www.reddit.com/r/cringe/</a> for all the links I'm simply getting <code>[]</code> as a result: </p>

<pre><code>#this code will scrape a Reddit page

from lxml import html
import requests


web_page = requests.get("https://www.reddit.com/r/cringe/")

tree = html.fromstring(web_page.content)

links = tree.xpath('//div[@class="data-url"]/text()')

print links
</code></pre>

<p>What's the problem with the xpath I'm using? I can't figure out what to put in the square brackets in the xpath</p>