Download & Extend

how to get channel info into node?

Project:Feeds
Version:6.x-1.0-beta4
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I have looked through the issue queue and don't think anything about this - but seems so obvious i am assuming i am just going baout this the wrong way.

I would like to include channel info in each node that gets created from a feed. But as far as i can tell only the xml node fields are available to map to cck fields.

for instance:

<rss version="2.0">
  <channel>
    <title>AviationWeek.com Business Aviation Channel</title>
    <link>http://www.aviationweek.com/avnow/news/channel_busav.jsp</link>
    <description>AviationWeek.com's Business Aviation channel delivers news, data and information about the business aviation market. This information is intended for organizations that manufacture, fly, operate, maintain, sell and charter business jets, helicopters and turboprops.</description>
    <copyright>Copyright 2007, McGraw-Hill Aerospace &amp; Defense</copyright>

    <lastBuildDate>Thu, 02 Sep 2010 11:00:01 EDT</lastBuildDate>
    <language>en-us</language>
    <managingEditor>feedback@aviationnow.com</managingEditor>
    <webMaster>aw_intelligence@aviationnow.com</webMaster>
    <image>
      <title>AviationWeek.com Business Aviation Channel</title>

      <url>http://www.aviationweek.com/media/images/mhad/homepage/logo_avn2.jpg</url>
      <link>http://www.aviationweek.com/avnow/news/channel_busav.jsp</link>
      <width>144</width>
      <height>38</height>
      <description>AviationWeek.com Business Aviation Channel</description>
    </image>

    <item>
      <title>TSAa??s GA Airport Survey In Validation</title>
      <link>http://www.aviationweek.com/avnow/news/channel_busav_story.jsp?id=news/awx/2010/08/30/awx_08_30_2010_p0-251055.xml&amp;source=rss</link>
      <guid isPermaLink="true">http://www.aviationweek.com/avnow/news/channel_busav_story.jsp?id=news/awx/2010/08/30/awx_08_30_2010_p0-251055.xml&amp;source=rss</guid>
      <description>TSA is currently validating results of its survey of 3,000 general aviation airports for security vulnerabilities.</description>
      <pubDate>Mon, 30 Aug 2010 17:49:44 EDT</pubDate>

      <source url="http://www.aviationweek.com/avnow/news/channel_busav.jsp">busav</source>
    </item>

so from example above i would like to fill a cck field for each node created with the Channel title. Ideally i would also like to pull the channel image into the node.

is this able to be done now? what am i missing?

Comments

#1

You could write your own parser. The instructions are here: http://drupal.org/node/622700 (Section: Implementation of a feeds plugin). The sample code provides enough code to get you started.

#2

Status:active» closed (duplicate)

#1 is right - you could either extend or patch FeedsSyndicationParser and FeedsSimplePieParser. In fact, I would accept a patch that makes feed level information available as mapping source.

This issue is a duplicate:
#806410: Using feed title as mapping source (e. g. map to CCK field)