Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Great module and got it to work for text portion of web pages to grab various html elements.
Yet, having trouble on getting the images from a web page.
In a content type, added CCK image field as subset of File field and followed the same mapping procedure as text field above, yet,
can't seem to make it work. Is this correct way to go by trying to import the 3rd party image to a CCK Image field ?
Is there any Xpath example that will help ?
Thx much,
Comment | File | Size | Author |
---|---|---|---|
#13 | Screen Shot 2015-10-18 at 20.12.20.png | 74.91 KB | kenorb |
Comments
Comment #1
travisc CreditAttribution: travisc commentedHave you tried feeds image grabber? http://drupal.org/project/feeds_imagegrabber
Comment #2
sbydrupal CreditAttribution: sbydrupal commentedTried Feeds_imagegrabber, yet, it completely runs in its own and it looks quite heavy duty module. Trying to find out whether as part of xpath parser, it can be achieved via Feed Import process with certain known tags...
Comment #3
Problue Solutionssubscribe
Comment #4
tommybyskovlund CreditAttribution: tommybyskovlund commentedany hints on how to do this - or whether it's possible?
Comment #5
Problue SolutionsSurprisingly it works by just capturing the URL of the image in the xpath expression and mapping it to a regular imagefield.
feeds_imagegrabber is not required.
Comment #6
druplicate CreditAttribution: druplicate commentedImporting images into a multi-valued image field using image URLs from an XML file is not working for me. The debug output shows the image URLs being parsed correctly, but the images don't get imported.
The XML structure is:
The context is: //unit
The Xpath query for the image field is: unit_details/images/image/uri
I played around with the image grabber module for feeds, but it failed also.
Is it possible to import images using the URL from the XML file?
I'm using feeds version 6.x-1.0-beta12+18-dev, and feeds xpath parser version 6.x-1.12 (or 6.x-1.x-dev)
UPDATE:
I was able to import images using the CSV importer and the image URL, so this appears to be a problem with Xpath Parser, not Feeds.
Comment #7
druplicate CreditAttribution: druplicate commentedOops, duplicate post.
Comment #8
druplicate CreditAttribution: druplicate commentedTried this in D7 and it throws the error: "Download of example.com/files/content/en-thailand-villa-102-1.jpg failed with code -1002."
I can't find what component is responsible for that error code. cURL doesn't seem to have error codes like that. Tried forcing Feeds NOT to use cURL (as suggested here: http://drupal.org/node/752862#comment-2766422) but it still fails with the same error code. This fails on my local dev box and on the live server (host is Omega8.cc).
It's puzzling though, since importing the same URL using the CSV parser works ok.
Comment #9
twistor CreditAttribution: twistor commentedThis is a Feeds issue.
Try restarting apache.
Comment #10
twistor CreditAttribution: twistor commentedComment #11
druplicate CreditAttribution: druplicate commentedI hijacked this original thread because I thought it was similar and seemed to be an Xpath Parser issue, not feeds, but I'll return this thread to xpath and resubmit a new request at Feeds.
Comment #12
vonFrakas CreditAttribution: vonFrakas commented#5 is awesomely correct. It just works™!
Comment #13
kenorb CreditAttribution: kenorb commentedThe same for 7.x.It's trying to creating the values, but I've only have this rubbish as shown on the screenshot.
Ignore. My problem is related to bad URL structure so Feeds doesn't recognise the file extension, so I need either to allow custom extension (asp) or rename the target filename.