News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

RSS Feeder

Started by SlammedDime, January 11, 2009, 06:06:42 AM

Previous topic - Next topic

Vampy

#360
Thanks mrtrc266 I'll try that :D

Thanks that worked - now just one question - any way to get the main pic as well as the text?

Killer-B

mrtrc -

Where'd you pull this code from for her news? "yn-story-content"

yn = yahoo news obviously...  but the "story" and "content' bits... did you go into the HTML header files and look again?

SMF 2.0RC1

mrtrc266

#362
@ Killer & Vampy

This works for all feed I have used so far, we'll use this as an example...

Feed URL...
http://rss.news.yahoo.com/rss/world

Once you click on that you'll see the list of feeds and click on the first feed...
http://news.yahoo.com/s/nm/20090402/od_uk_nm/oukoe_uk_g20_australia_apology

Look for the first words in the article "LONDON (Reuters)"

Right click and view the source and search for "LONDON (Reuters)"

Find the first DIV before that, in this case its <div class="yn-story-content"> so the Regular Expression will be...

~<div class="yn-story-content">(.*)<\/div>~siU

Hope that helps

mrtrc266

QuoteThanks that worked - now just one question - any way to get the main pic as well as the text?

No Problem....Not sure about that, I think the pics in another DIV so I'm not sure how that would work.

Vampy

Quote from: mrtrc266 on April 02, 2009, 06:20:50 PM
QuoteThanks that worked - now just one question - any way to get the main pic as well as the text?

No Problem....Not sure about that, I think the pics in another DIV so I'm not sure how that would work.
Yeah I checked and it is - If I go back to that div all I get is the pic and the "teaser" text - just like the main index page

Thanks for trying I appreciate it

mrtrc266

This is working great in retrieving the full articles but for some reason it won't pull the pics. Check it out here....

http://monsters-mansion.com/index.php/topic,3134.msg5850/topicseen.html

Any ideas on this?


Thanks in advance.

SlammedDime

It is pulling the images, the problem is the site doesn't use full urls in their image src tags like they should, they use relative urls, which means the image tries to load relative to your site, which of course doesn't work.  I'll think of a way to fix it, but I don't know how easy it will be.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

mrtrc266

Thank you very much, that would be awesome ig you could get that going.

Jimi1810

Quote from: Jimi1810 on February 09, 2009, 04:56:19 AM
Sorry if this has been covered but I am able to import the full article without any problems, except one; when ever there is a "£" symbol the text stops.

http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/gossip_and_transfers/rss.xml [nofollow]

thats the feed I'm using so if I take this post for example:

http://news.bbc.co.uk/sport1/hi/football/gossip_and_transfers/7878186.stm [nofollow]

where it says "AC Milan general manager Adriano Galliani admits their offer for David Beckham is way off what LA Galaxy want - the Americans are believed to value the midfielder at £15m. (Daily Mirror)"

I don't get that in the thread, I get "AC Milan general manager Adriano Galliani admits their offer for David Beckham is way off what LA Galaxy want - the Americans are believed to value the midfielder at"

It stops at the "£" and doesn't post anything else below it from the page, it does this for every story it imported which contains a "£" symbol, is there any way I can fix this? if it matters, the regular expression I am using is:

~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU

thanks, I love this mod, it's the main reason I am converting to SMF  :D

Sorry I've not checked in a while so not 100% sure, but did you get a chance to have a look at this SlammedDime? if not no worries, thanks.

mrtrc266

@ Jimi1810 

Try this DIV instead, I just got it to pull the full article using that.

<div class="ch1">

Jimi1810

Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.

mrtrc266

Quote from: Jimi1810 on April 08, 2009, 01:44:06 PM
Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.

Hmmm, I actually just tried it with the regex your were using ~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU and the result is here....

http://www.monsters-mansion.com/smf2/index.php/topic,2782.0.html

Then tried with the ch1 div ~<div class="ch1">(.*)<h3>Bookmark with:<\/h3>~siU and result is here...
http://www.monsters-mansion.com/smf2/index.php/topic,2783.0.html
and here
http://www.monsters-mansion.com/smf2/index.php/topic,2784.0.html

Only diff really is that one tries to pull the pic? Sorry I thought I was onto something but as usual I'm waayyy off....LOL







Jimi1810

#372
Oh you actually have it working! thanks a lot for that, at least I know it is possible. I'll try installing it on another of my test forums and see if that makes a difference.

*edit* tried a clean install of SMF 2.0 RC1 and downloaded the latest 1.1.1 of this mod (had 1.1.0 before) but still getting the same problem, hmm.

Vampy

#373
Sorry to be a pain again but do you think the regex <div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU would work with this feed - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml ? I'm still trying to find a way to get the pictures in it too



In addition to this I still have the issue when using my theme (tabs-purple)- all I get is a blank white box when I want to add or edit a feed (see attached) - is there some file within my theme I need to edit to get it to show properly? I couldn't see anything outside of default files etc within the install xml file

SlammedDime

Vampy, you probably have a blank screen like that because there is a Modifications.english.php in the languages folder in your Theme directory.  There should not be.  You should copy everything in that file into the Modifications.english.php folder in the default theme language directory, then delete it.

For that feed, you'd want to use: ~<td class="storybody">(.*?)</td>~si and that should get everything.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Vampy

Thanks SlammedDime but that's what's causing me such a headache with this - there IS no Modifications.english.php file in my themes languages folder, the only thing in there is ThemeStrings.english.php - everything else runs from the default files.

I'll try that string for the BBC feed - fingers crossed :D

SlammedDime

Are there any errors in your error log?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Vampy

#377
From within SMF error logs this is all I have

Apply Filter: Only show the error messages of this URL  http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: message
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/Subs-Post.php
Line: 1845
   

Apply Filter: Only show the error messages of this URL http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
2: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '('
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/ScheduledTasks.php
Line: 1723
   


     Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: message
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/Subs-Post.php
Line: 1845


Nothing looks suspicious - do you want me to look on the server error logs too?

Mack450

cronrss.php is not working for me
www.atvsector.com

Powered by SMF

SlammedDime

Can't really help you... this mod doesn't have such a file.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: