www.website-watcher.com Forum Index www.website-watcher.com
HomeProductsNewsContact
 
 FAQFAQ   SearchSearch   RegisterRegister   ProfileProfile   Log inLog in 

WSW_PreprocessPage doesn't save data as expected

 
Post new topic   Reply to topic    www.website-watcher.com Forum Index -> WebSite-Watcher Support
View previous topic :: View next topic  
Author Message
pepperxxx



Joined: 29 Apr 2006
Posts: 37

PostPosted: Mon May 28, 2012 1:41 am    Post subject: WSW_PreprocessPage doesn't save data as expected Reply with quote

Hi!

I am using Wsw_PreProcessPage in a shared plugin (I've tried private as well) to extract some valuable content from an RSS feed.

My code (simplified) looks like this:

Code:
Sub Wsw_PreProcessPage(Handle, ByRef sMem, ByRef sStatusMessage, ByRef iStatusCode)

   Dim FeedTitle

   FeedTitle = GetFirstWildcardMatch(sMem, "<wswrsstitle>*</wswrsstitle>")
   Bookmark_SetProperty(Handle, "infofield1", FeedTitle)
   sMem = FeedTitle

End Sub


When debugging the abovelisted Wsw_PreProcessPage function on a rarely updated RSS feed I constantly get empty sMem as well as {infofield1} in the debugger. I tried to delete the local cache of the bookmark, re-checked it many times - without any result. The source RSS feed is also never gets offline, and there is always a non-empty string between "<wswrsstitle>" and "</wswrsstitle>". What can cause the described behaviour of Wsw_PreProcessPage? The Page Source pane of the Plugin IDE shows me only the result of Wsw_PreProcessPage, i.e. the contents of FeedTitle. But when I test the subroutine in the production environment, i.e. on the live RSS feed, it continues bringing me empty updates. What's the problem?
Back to top
View user's profile Send private message
Martin Aignesberger
Site Admin
Site Admin


Joined: 11 May 2005
Posts: 5861

PostPosted: Wed May 30, 2012 10:27 am    Post subject: Reply with quote

It seems that you ran into a conflict with the internal RSS feed conversion.

If you want to use Wsw_PreProcessPage in combination with an RSS feed, I would recommend to use the file type to "text", then no internal RSS feed conversion will be applied. (bookmark properties + advanced + check(1))

Instead of "<wswrsstitle>*</wswrsstitle>" you have to use "<title>*</title>" then.
_________________
Martin Aignesberger [SUPPORT]
Back to top
View user's profile Send private message
pepperxxx



Joined: 29 Apr 2006
Posts: 37

PostPosted: Wed May 30, 2012 12:11 pm    Post subject: Reply with quote

Thanks, Martin, this worked for me. Btw, is there any way to pass the check option you mentioned through Excel bookmark import?
Back to top
View user's profile Send private message
Martin Aignesberger
Site Admin
Site Admin


Joined: 11 May 2005
Posts: 5861

PostPosted: Mon Jun 04, 2012 10:35 am    Post subject: Reply with quote

Quote:
Btw, is there any way to pass the check option you mentioned through Excel bookmark import?


No, this is not possible.

But you can use the "Set properties in all selected bookmarks" feature to change that option.
_________________
Martin Aignesberger [SUPPORT]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.website-watcher.com Forum Index -> WebSite-Watcher Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group