RSS Widget – Yahoo feed
-
Would appreciate some help with this.
I have set up a Yahoo RSS feed in the RSS sidebar widget. It displays the news headlines properly, but the links are bad.
The URL for the feed is:
http://finance.yahoo.com/rss/headline?s=%5Bticker_symbols%5D
The link that is generated for each item has the following structure:
http://us.rd.yahoo.com/finance/news/rss/story/http://biz.yahoo.com/rb/080404/%5Bstory_page%5D
Of course, the correct address begins with the second http.
So my questions are:
1. Why does the Yahoo feed generate these links? Is there a different feed that generates correct links?
2. I’m an inept coder, but I assume I can modify the rss.php file to strip the extraneous info from the URL. Anyone care to suggest the appropriate code?
By the way, I’ve put up a feed from a different source and it works fine, so this seems to be a Yahoo peculiarity.
Thanks in advance for your help!
-
1. They want to track who clicks it. No, I doubt it.
2. You don’t need to, but you can use
strstr($link,"*").Send me an ecard if this works out. 🙂
Thanks, Pinoy.
But why do you say I don’t need to? As generated the links go to a 404 page. The correct link begins with the second “http”.
Pinoy, thanks again for pointing me in this direction.
I now understand that the problem with the link is that it doesn’t generate the * in front of the target URL.
I’ll post here if I can figure out how to fix. But any help would be appreciated.
OK. Let me lay out the problem as I now (finally) understand it.
A link generated by the Yahoo! Finance news feed in the RSS sidebar widget looks like this:
That link is incorrect and brings up a 404 page.
Instead, there should be a “*” immediately prior to the target URL, like this:
That link goes to the right page.
Can anyone help me fix this? Thanks!
I checked a few http://finance.yahoo.com/rss/headline?s=%5Bticker_symbols%5D and all of the links in them have asterisks, so they work as is (cf. my #2 answer).
The topic ‘RSS Widget – Yahoo feed’ is closed to new replies.