vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Article Bot (https://vborg.vbsupport.ru/showthread.php?t=67078)

Frzzy 07-14-2004 07:38 PM

Seem like the bot doesn't work with this RSS...

http://www.theinquirer.net/inquirer.rss

I know why, look like the bot won't do anything if the description tag is missing.

romeshomey 07-14-2004 07:41 PM

Quote:

Originally Posted by Velocd
Normally the article title shouldn't be inside the description, unless you modified the articlebot_post template.

Take a look and you'll see what I mean. You'll see how where the text in bold ends is where there needs to be a space before the rest of the desctiption is posted.

http://www.insidersportszone.com/for...6602#post26602

It keeps doing this:
Code:

Odom, Butler, Grant and pick go to LakersMIAMI -- It's official: The Shaquille O'Neal era in Los Angeles is over, and his new team is the Miami Heat.The Lakers and Heat finalized a trade Wednesday sending O'Neal to Miami. Los Angeles gets Caron Butler, Lamar Odom, Brian Grant and a first-round draft pick.The deal had been on the verge of completion since Saturday, when O'Neal met in Orlando with Heat president Pat Riley and agreed to the trade. NBA attorneys approved it on the same day the league's two-week moratorium... (Associated Press)
See how there is no space between the work Lakers and the word MIAMI. It does that in all of them and the space is there in the RSS feed itself.
Code:

<pubDate>Fri, 9 Jul 2004 20:48:37 CEST</pubDate>
  <guid isPermaLink="false">i,43741943</guid>
  </item>
- <item>
  <title>Shaq traded to Heat in blockbuster deal</title>
  <link>http://www.newsisfree.com/click/i,44177556,1851,rss/</link>
  <description><b>Odom, Butler, Grant and pick go to Lakers</b>MIAMI -- It's official: The Shaquille O'Neal era in Los Angeles is over, and his new team is the Miami Heat.The Lakers and Heat finalized a trade Wednesday sending O'Neal to Miami. Los Angeles gets Caron Butler, Lamar Odom, Brian Grant and a first-round draft pick.The deal had been on the verge of completion since Saturday, when O'Neal met in Orlando with Heat president Pat Riley and agreed to the trade. NBA attorneys approved it on the same day the league's two-week moratorium... (Associated Press)</description>


romeshomey 07-14-2004 07:43 PM

Quote:

Originally Posted by Frzzy
[high]* Frzzy clicks install
[/high]

A question, can the bot recognize and ignore already posted item?

I wonder the same thing as it keeps posting the same articles again and again, and if I remove it, itll post it as the next one again.

romeshomey 07-14-2004 08:12 PM

Quote:

Originally Posted by romeshomey
See how there is no space between the work Lakers and the word MIAMI. It does that in all of them and the space is there in the RSS feed itself.

My mistake, the RSS doesnt provide a space in the description which is why there is no space.

Theres no way to add one is there?

IM just glad I got the HTML to work. That was a big plus. If anyone else has the same problem with the HTML showing up as code and not being executed.

The fix for the HTML is:

In the forums/articlebot/articlebot.php change:
Code:

$article['description'] = strip_tags(htmlspecialchars($article['description']));

too

$article['description'] = $article['description'];

Then just make sure that HTML is enabled in that forum section.

ranger2kxlt 07-14-2004 08:24 PM

Thanks for the link, but not 100% how to use this?

Instead of making the bot link to a .rss or .xml file, i now link him to the one generated by that link? Because all the pages it shows me seem to show up as html....

Thanks

Velocd 07-15-2004 12:46 AM

Quote:

The fix for the HTML is:

In the forums/articlebot/articlebot.php change:
romeshomey, it's working for you because you have HTML enabled for your posts (which is not a good idea). For anyone else, they will only get HTML tags, so it's good to have the strip_tags() normally in there.

Quote:

I know why, look like the bot won't do anything if the description tag is missing.
Yes, as I said not too earlier here, RSS feeds without descriptions will be skipped.

Quote:

My mistake, the RSS doesnt provide a space in the description which is why there is no space.

Theres no way to add one is there?
Not really. It's the mistake of the RSS provider to forget the space, but there isn't really a way to add it, given the arbitrary data.

Quote:

I wonder the same thing as it keeps posting the same articles again and again, and if I remove it, itll post it as the next one again.
As said, the bot starts at the end of the file (oldest articles) and counts its way up. It makes sense that if you remove a thread, the bot (which does check for existing threads) will re-create it. Instead of removing the thread from the database, if you wish to get rid of it, "soft" delete it.

Also note there is a "initial article trim" to skip a number of articles when first starting on an RSS feed.

romeshomey 07-15-2004 03:44 AM

Thanks Velocd. Very useful script...

sjau 07-15-2004 02:38 PM

Can someone test out this feed? I can't get it to work with either bot:

http://www.swissinfo.org/sde/swissin...?siteSect=1111

romeshomey 07-15-2004 03:09 PM

Quote:

Originally Posted by sjau
Can someone test out this feed? I can't get it to work with either bot:

http://www.swissinfo.org/sde/swissin...?siteSect=1111

It might only work with feeds with date tags. Not sure though, but I notice your feed has no dates in it..

ranger2kxlt 07-15-2004 03:18 PM

Ok, got my search query going good....but! it seems to pull the same info from different sources, and i have repeat posts.....is there a way to moderate the bot? so all i have to do is look at the threads and take out the dups.?

Its an extra step, but at least i don't have to find the news!

Thanks


All times are GMT. The time now is 06:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01850 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete