matthewmueller/x-ray

Issue handling URL from XML

Aperta

#21 aperta il 14 mar 2015

 (8 commenti) (0 reazioni) (0 assegnatari)JavaScript (415 fork)batch import
featurehelp wanted

Metriche repository

Star
 (5804 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I've been digging on this for a while, but I'm pretty stumped right now.

<item>
    <title>Greece's Varoufakis says QE to fuel unsustainable equity rally</title>
    <link>http://feeds.reuters.com/~r/reuters/businessNews/~3/EaR-N8x3VzU/story01.htm</link>
    <description>CERNOBBIO, Italy (Reuters) - The European Central Bank's bond purchases will create an unsustainable stock market rally and are unlikely to boost euro zone investments...</description>
</item>

With .select(['item title']) I'm able to get all of the titles. With .select(['item description']) I'm able to get all of the descriptions. But with .select(['item link']) I only get an array of empty strings back. The number of empty strings equals the number of items in the page.

I'm going to keep digging in, but I think I already have keyboard marks on my forehead. =|

I've tried this using a $root with a link: 'link' attribute already, but same difference.

This is the specific URL I'm scraping: http://feeds.reuters.com/reuters/businessNews?format=xml

Guida contributor