This question has been flagged
2509 Views

My goal is to create a page information that simply read data from a xls or cvs files. This page I would like to insert into tab product.template.

This is simple schema: PRODUCT PAGE ---> TAB "INFO" <-- simply print data from a xls or cvs

---------------------

from urllib.request import urlopen

from xml.etree.ElementTree import parse

# Download the RSS feed and parse it

u = urlopen('http://site.org/rss.xml')

doc = parse(u)

# Extract and output tags of interest

for item in doc.iterfind('channel/item'):

title = item.findtext('title')

date = item.findtext('pubDate')

link = item.findtext('link')

print(title)

print(date)

print(link)

print()

----------------------

Avatar
Discard
Author

Xml or Cvs (xls)...excuse me