Hi,

I've got a feed import set up using the HTTP fetcher. It creates nodes of a certain type. I need it to import repeatedly so I've got Periodic Import set to "As often as possible". I've got "import on submission" and "process in background" checked also. However, the imports are not taking place ever. If I go to /import and do it manually, it creates 25 nodes on the first occasion only. If I repeat the import it doesn't create more nodes.

I probably have a misconfiguration somewhere so forgive me it that's the case but I can't figure out what the problem is.

Any ideas?

Thanks!

G

Comments

gtothab’s picture

Any idea how I can get my feed to import periodically? I've tried just about every combination of settings to get it to import and create nodes periodically (on cron) but nothing seems to work.

MegaChriz’s picture

By default, when an import is triggered, Feeds only imports new or changed data. Is the data you are trying to import new or changed? If that's the case, try to reproduce the issue on a fresh Drupal install with a minimal amount of modules enabled (to be sure it's not a module conflict).

gtothab’s picture

Hi

Thx for replying. I'm trying to fetch youtube videos and in the past ive been able to have feeds grab all of them (25 at a time) each time I manually imported or on cron. That's the desired outcome here but it imports the first 25 and then never gets any more vids.

MegaChriz’s picture

Status: Active » Postponed (maintainer needs more info)

Fetching youtube video's with Feeds, is this done with only the Feeds module itself or do you have other modules installed that extend Feeds? (For example: Feeds Tamper, Feeds XPath Parser, etc.)

Did you test if the issue also occurs on a fresh Drupal installation with only the modules enabled that Feeds need to function?

Maybe you want to attach an export of the Feed here as a file. If you do so, be sure to have the least mapping/settings that is needed to the reproduce the issue.

Irous’s picture

Hi there, I do the same thing with my site (import youtube via Feeds).

"If I go to /import and do it manually, it creates 25 nodes on the first occasion only. If I repeat the import it doesn't create more nodes. "

How long did you wait until you manually imported the second time? Were there any new records in the actual feed? No new nodes will be created if there aren't any new items in the feed. And is your cron running properly?

Here are my settings for my youtube imported in Feeds if it helps in any way:

Basic settings:
(Name of your importer*)
(Description)
Attach to content type: Use Standalone form
Periodic Import: (I only need to do mine every 3 hours)
Import on submission

Fetched: HTTP Fetcher

Parser: Common syndication parser

Processor: Node processor

Node processor settings:
Content type: media
Do not update existing nodes
Expire nodes: never

Author - (my name)
Authorize - Check that the author has permission to create the node. (I have this deselected just in case)

Also note that for mapping, I've made sure that there's a field set as unique so I don't get duplicates.

So, with that, I go to the name of my importer.. e.g website.com/import/(Name of your importer*)
and enter the url I want the importer to subscribe to.. e.g

http://gdata.youtube.com/feeds/base/users/(username)/newsubscriptionvideos

That manually imports the first batch and it will remember the url. I have my cron set up to run every hour, so it'll check to see if this needs to be imported every 3 hours and if there is new content, it will create new nodes of that content type.

gtothab’s picture

Hi,

Thanks for helping out!

"How long did you wait until you manually imported the second time? Were there any new records in the actual feed?"

- I waited a long time... There were no new records but I was expecting it to import the other records that it did not import on the first run (having only imported 25).

"And is your cron running properly?"

- Yep.

Question:

Are you using an HTTP fetcher combined with Common syndication parser (Parse XML feeds in RSS 1, RSS 2 and Atom format)?

Also, in the URL you posted (http://gdata.youtube.com/feeds/base/users/(username)/newsubscriptionvideos), what does the 'newsubscriptionvideos' refer to? Is that a playlist name or something?

Are you able to fetch stuff like video description and publish date and map those to your node type?

Thanks a bunch!

G

Irous’s picture

"- I waited a long time... There were no new records but I was expecting it to import the other records that it did not import on the first run (having only imported 25)."

Check out the feed you're importing from - maybe there's a 25 record limit in there, and when you manually imported the second time, your feed may not have added any new items to import. You should do some additional testing - perhaps follow a more active youtube feed as a test?

You could generate one at: https://gdata.youtube.com/demo/index.html

or probably import this standard "most recent" feed: http://gdata.youtube.com/feeds/api/standardfeeds/most_recent

"Are you using an HTTP fetcher combined with Common syndication parser (Parse XML feeds in RSS 1, RSS 2 and Atom format)?"

Yep! Youtube feeds are in that format.

"Also, in the URL you posted (http://gdata.youtube.com/feeds/base/users/(username)/newsubscriptionvideos), what does the 'newsubscriptionvideos' refer to? Is that a playlist name or something? "

That feed lists all the latest videos from the channels I've subscribed to. I have it set to public so that my feed importer can get to it.

"Are you able to fetch stuff like video description and publish date and map those to your node type?"

Yep! Although, it's worth noting that some feeds don't include video descriptions. The ones I use do, like these ones:

http://gdata.youtube.com/feeds/api/users/Seananners/uploads?orderby=updated
http://gdata.youtube.com/feeds/base/users/(username)/newsubscriptionvideos

I use the Tamper module for Feeds to remove the html tags from the descriptions imported from the feeds above. Just a note, I think they reduced the character count from the description field in those feeds only recently to something like 155 characters maximum. You used to be able to grab the entire description from the feed.

The ones that you can generate through https://gdata.youtube.com/demo/index.html don't some to have any descriptions.

I also some additional modules which help with the actual display of videos/generation of thumbnails (not needed for the importing procedure, btw)..

http://drupal.org/project/media
http://drupal.org/project/media_youtube

gtothab’s picture

Hi,

Thanks for the feedback. I'm now having a more serious problem after having migrated to another host. I'm getting this error even though my CURL library is enabled and working properly on my server:

cURL error (0) Failed to connect to 2607:f8b0:4000:805::1000: Network is unreachable for http://gdata.youtube.com/feeds/api/playlists/PLkpUXlaLsBQDC3llwMFJAWhHqY...

:(

twistor’s picture

@gtothab, the first thing you want to do is turn of "Process in background". That setting makes manually running the import into a background task, normally it should be fine to run it in the foreground. You should see a progress bar.

Second, have you looked at the feed directly to see how many items are in it?

matthensley’s picture

Not sure how helpful this is, but I have also had some trouble using periodic import with the http fetcher. I think I'm getting closer to tracing out the root of it- when trying to save an importer using the http fetcher, I was getting a php error saying "Call to undefined method FeedsMissingPlugin::importPeriod" in feeds/includes/FeedsSource.inc in the "scheduleImport" function. As a test, I commented out the retrieval of the fetcher_period and just hardcoded a period into the job definition, which seems to be working for me. Not sure if there is something different about the httpfetcher import period declaration or where else the problem is, but maybe this helps somebody.

twistor’s picture

Component: Feeds Import » Code
Category: Bug report » Support request
Priority: Major » Normal
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)