0

I would like to start a project with a bot that reads an XML file with products, finds the tag <image></image> and takes the URL of the image, for example: https://www.example.com/image.jpg and download it on a folder directly or save the path on a different CSV file.

I would like to make this bot with Python or PHP but every language is acceptable if those programming languages doesn't meet the criteria. The questions that I would like to ask can be found above:

  1. Is that possible? Download the image directly or save the path on different CSV?
  2. Which programming language is preferred to use if is that possible?
  3. If is that possible and you have suggested me a programming language, Do you know any library that could help on my project?

Every help would be appreciated. Thank you so much!

Tomalak
  • 332,285
  • 67
  • 532
  • 628
  • 2
    1) That's possible. 2) The question is opinion based and does not fit the rules of SO. 3) On SO requests for libraries and other off-site resources are considered off-topic. All together your question(s) are too broad for SO as well. Please have a look at the tour and the help-center too see how to write a good question and how to ask! – Klaus D. May 20 '18 at 04:06
  • Seems like you want to parse an XML file, finding attributes/tags and their values (the URL of the image). I'm partial to Python, so I suggest you have a look at https://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python – rst-2cv May 20 '18 at 04:07
  • Possible duplicate of [Downloading a picture via urllib and python](https://stackoverflow.com/questions/3042757/downloading-a-picture-via-urllib-and-python) – Usama Jamil May 20 '18 at 04:11
  • Both Python and PHP are fine for this task, choose the one you feel most comfortable with. About the procedure, just do what you've described in your question - open the file, read it, parse the data, get the url, request the url, save the response content. – t.m.adam May 20 '18 at 04:20

0 Answers0