WordPress.org

Ready to get started?Download WordPress

Forums

WP RSS Multi Importer
[resolved] How to import out of line content (6 posts)

  1. another_sam
    Member
    Posted 1 year ago #

    Hi I would like to know how to import out of line content from an Atom feed. That is, instead of being between <content> tags, the content is another page or feed.

    In other words, I have a feed which is only a digest, and I want to import not only the titles of the entries, but also its content.

    Thank you very much.

    http://wordpress.org/extend/plugins/wp-rss-multi-importer/

  2. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    Hello, my plugin doesn't do this...not sure if there is another plugin that is currently set up for it as you are basically talking about screen scraping another web site and using code to parse the results into usable form.

  3. another_sam
    Member
    Posted 1 year ago #

    Thank you very much for such a fast answer.

    Sorry. The scenario is more feasible than I explained, since the digest in question points to another Atom feed with only one entry _and_ a filled content tag.

    Could this be achieved with your plugin, or with another that you know?

    Thank you again.

  4. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    can you give me the RSS url so I can see it (I have no idea if this can be achieved or not without seeing what is involved).

  5. another_sam
    Member
    Posted 1 year ago #

    Sorry for the delay. I don't have a public host for this project yet and I was writing a simplified demo.

    So there is a digest feed (digest-feed.xml) and a detail feed (detail-feed.xml).

    You can see the <content ... /> in the former and the <content>...</content> in the later.

    Thanks.

    digest-feed.xml

    <?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
      <title>digest feed title</title>
      <link rel="self" href="http://localhost/digest-feed.xml" type="application/atom+xml"/>
      <updated>2013-02-08T13:58:38Z</updated>
      <id>http://localhost/digest-feed.xml</id>
      <author>
        <name>.</name>
      </author>
    
      <entry>
        <id>http://localhost/detail-feed.xml</id>
        <title>title of the entry</title>
        <content src="http://localhost/detail-feed.xml" type="application/atom+xml" />
        <updated>2013-02-07T13:58:38Z</updated>
        <summary>this is a summary</summary>
      </entry>
    
    </feed>

    detail-feed.xml

    <?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
      <title>detail feed title</title>
      <link rel="self" href="http://localhost/detail-feed.xml" type="application/atom+xml"/>
      <updated>2013-02-08T13:58:38Z</updated>
      <id>http://localhost/detail-feed.xml_container</id>
      <author>
        <name>.</name>
      </author>
    
      <entry>
        <id>http://localhost/detail-feed.xml</id>
        <title>title of the entry</title>
        <content type="xhtml">
          <div xmlns="http://www.w3.org/1999/xhtml">
            <p>first paragraph of the content</p>
            <p>second paragraph of the content</p>
          </div>
        </content>
        <published>2013-02-07T13:58:38Z</published>
        <updated>2013-02-07T13:58:38Z</updated>
      </entry>
    
    </feed>
  6. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    my plugin, like many others, uses simplepie to read and parse atom and xml feeds. In my case, it looks for the content tag and if it doesn't find it looks for the description tag. So, in your detail-feed.xml it would find the content tag. However, it will not likely get any content that is pulled from another url.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic