Firiyuu1 Posted June 11, 2018 Share Posted June 11, 2018 Hello, how do I get the ean13 via url request? because with the current python libraries, all the links and id's are gettable, here's my prior code: api = PrestashopApi('http://www.example.com/api', '<token code here>') #GET DATA FROM PRESTASHOP print('Getting products from prestashop.... ') res = api.get('products') count = 0 for p in res['products']['product']: if count == 10000: break else: url = p['@xlink:href'] r = PrestashopApi(url, '<token>') print(r) print('Success') I can get the links from my shop with this, however how should I get the EAN13's? I tried doing all sort of things, I tried various methods, ( dumping to json, scraping, xmltree, etc) either the response was empty or I get lots of errors. I tried getting it from library by p['@ean13'] since it got the id via p['@id'] and the link via p['@xlink:href'] but im getting a keyerror. I really need your help. Please. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now