Page 1 of 1

Channel Generated from search result: NO NewFeedItem=1 tag

Posted: Tue Sep 02, 2008 1:25 pm
by Otonicara
In regard to my previous posts I have to say that it would be much better if your development would take some time and prepare advanced code samples. Parsing data from Metatag is one of those. It is not user specific. Exact step by step case would be quickes learning method for user and time saver for support. Be aweare that main Awasu advantage are its advanced functionalities – being able to call Python code from Channel, being able to export data, complex keywords etc.. The same time full time programmer would probably not purchased Awasu as he is more than able to do his own rss reader. I would suggest that for the future you consider my suggestion. For me is to late I already spent one months to get Awasu working the way I need. Big advatage was that you forced me to switch to Python. Realy cool programming language. I reprogramed my entire logic to Python. Awasu related problems takes just 20% of the entire logic.

Bellow you can find my last problem which is Python specific as HOOK works by one Type of Channel and does not work by the other. I do hope you will provide me solution… Bellow you can find systematic problem description…

LOG: C1
[NewFeedItem]
ItemId=21653
ExternalItemId=
ItemTitle=Media Advisory/REMINDER: Government of Canada%0A*0
ItemUrl=http://www.marketwire.com/mw/release.do?id=894902&sourceType=3
TimeCreated=1220353468
ItemFingerprint=a3c023d54ecdf440feb86833f7278bd1
ItemMetadata=<value>Media Advisory/REMINDER: Government of Canada</value><group><value>http://www.marketwire.com/mw/release.do?id=894902&sourceType=3</value></group><value>1220353200</value>
ItemLink1_Uri=http://www.marketwire.com/mw/release.do?id=894902&sourceType=3
ItemLink1_RelType=
ItemLink1_Title=
ItemLink1_MediaType=
ItemLink1_LanguageTag=
ItemLink1_Size=0
ItemContent1_MediaType=
ItemContent1_LanguageTag=en
ItemContent1_Content=CALGARY, ALBERTA--(Marketwire - Sept 2, 2008) - The Honourable Monte Solberg, Minister of Human Resources and Social Development, and the Honourable Hector Goudreau, Alberta Minister of Employment and Immigration and Minister Responsible for the Francophone Secretariat and Member of the Legislative Assembly for Dunvegan-Central Peace, will announce a significant new investment to address skilled labour shortages in the Alberta labour market.%0A%0AMinister Solberg and Minister Goudreau will be available to respond to questions from the media following the announcement.%0A%0A
MarkedUpDescription=CALGARY, ALBERTA--(Marketwire - Sept 2, 2008) - The Honourable Monte Solberg, Minister of Human Resources and Social Development, and the Honourable Hector Goudreau, Alberta Minister of Employment and Immigration and Minister Responsible for the Francophone Secretariat and Member of the Legislative Assembly for Dunvegan-Central Peace, will announce a significant new investment to address skilled labour shortages in the Alberta labour market.%0A%0AMinister Solberg and Minister Goudreau will be available to respond to questions from the media following the announcement.%0A%0A%0A*0
PlainTextDescription=CALGARY, ALBERTA--(Marketwire - Sept 2, 2008) - The Honourable Monte Solberg, Minister of Human Resources and Social Development, and the Honourable Hector Goudreau, Alberta Minister of Employment and Immigration and Minister Responsible for the Francophone Secretariat and Member of the Legislative Assembly for Dunvegan-Central Peace, will announce a significant new investment to address skilled labour shortages in the Alberta labour market.%0A%0AMinister Solberg and Minister Goudreau will be available to respond to questions from the media following the announcement.%0A%0A
02sep08 13:04:55 | --- END CONFIG FILE ---
02sep08 13:04:56 | EVENT: ConsolidatedNewFeedItems
02sep08 13:04:56 | --- BEGIN CONFIG FILE ---


LOG: C2
02sep08 13:04:27 | EVENT: BeginChannelUpdate
02sep08 13:04:48 | EVENT: EndChannelUpdate
02sep08 13:11:14 | EVENT: BeginChannelUpdate
02sep08 13:11:26 | EVENT: EndChannelUpdate
02sep08 13:16:55 | EVENT: BeginChannelUpdate
02sep08 13:17:06 | EVENT: EndChannelUpdate
02sep08 13:22:26 | EVENT: BeginChannelUpdate
02sep08 13:22:28 | EVENT: EndChannelUpdate
02sep08 13:27:40 | EVENT: BeginChannelUpdate
02sep08 13:27:41 | EVENT: EndChannelUpdate
02sep08 13:32:53 | EVENT: BeginChannelUpdate
02sep08 13:32:54 | EVENT: EndChannelUpdate
02sep08 13:38:45 | EVENT: BeginChannelUpdate


HOOK: C2
[Config]
ScriptFilename=RSSExportToAccess.py
DisplayName=Save News-Feed Items to Access db
AuthorName=OtonicarA
AuthorEmailAddress=ales@otonicar.com
Notes=This channel hook saves the channel's individual feed items to Access database.

' ---------------------------------------------------------------------
[Events]
NewFeedItem=1

' ---------------------------------------------------------------------


Code – Py: C2
import sys
import pyodbc
import win32api

configFilename = sys.argv[1]

xTitle = win32api.GetProfileVal( "NewFeedItem" , "ItemTitle" , "" , configFilename )
xURL = win32api.GetProfileVal( "NewFeedItem" , "ItemUrl" , "" , configFilename )
xMetaData = win32api.GetProfileVal( "NewFeedItem" , "ItemMetadata" , "" , configFilename )
xDescription = win32api.GetProfileVal( "NewFeedItem" , "ItemContent1_Content" , "" , configFilename )



Problem Description:
In case I am using Hook / Python code shown above on CHANNEL (C1) created BY »right click New Channel/Download« from the Internet Python code works as it is programed. Feed Data are exported to Access data base. Hook shown above (calls my Python code) was attached to C1 only.

In case I use the same Hook/Python code on CHANNEL (C2) created BY »right click New Channel/Generated from search results« nothing is exported to Access Data Base. Above you can see log files. I had log hook on C1 and C2. I have hook shown above (calls my Python code) on C2 only.

In simple terms RSS feed URL address is on C1. C1 disply all feeds. C2 is used to filter feeds by key word. For example C2 takes only those feeds that match keyword for example in our case has »of« word in Title. As you can see from hook inspection above tag [NewFeedItem] is generated only in C1 and not also on C2. This is the reason why hook was not called… It looks like that Channels generated as C2 generate only Update tag …

Question:
The idea is to run my Hook / Python code once Awasu find news that match keyword creteria. Please let me know what trigger needs to be set in HOOK to achive the goal…. This is the last open issue I would like to resolve…

Re: Channel Generated from search result: NO NewFeedItem=1 t

Posted: Wed Sep 03, 2008 1:04 pm
by support
Otonicara wrote:As you can see from hook inspection above tag [NewFeedItem] is generated only in C1 and not also on C2. This is the reason why hook was not called…

That's correct. Your C2 log indicates that the channel updated a bunch of times but no new feed items were received, hence your hook was not called, hence nothing was added to your database.

I've run a little test myself and <tt>NewFeedItem</tt> events *are* generated correctly for hooks attached to a search channel so the most likely explanation for what you're seeing is that <u>no new feed items were received</u> :roll: