rkalis / appiepy Goto Github PK
View Code? Open in Web Editor NEW๐ A Python API for Albert Heijn
Home Page: https://pypi.org/project/appiepy/
License: MIT License
๐ A Python API for Albert Heijn
Home Page: https://pypi.org/project/appiepy/
License: MIT License
This breaks:
from appiepy import Product
print(Product("/producten/product/wi420790/princes-tonijn-stukken-in-water").nutrition)
error: xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 211
I traced it back to an less than character in the nutrition table. (Koolhydraten < 0.1)
Currently, nutritional information is saved as a string, eg '3.0 g'. This makes it difficult to do any computations with this information. However, just parsing the number won't be enough, since you do need the unit information (is it in g or mg or kg?). It could be an idea to save the information in a tuple, eg (3.0, 'g').
Running the code provided in the example gives an ProductNotFoundException
from functions import Product
import json
product = Product('https://www.ah.nl/producten/product/wi193679/lay-s-paprika')
print(json.dumps(product.__dict__, indent=4, sort_keys=True))
<Response [404]>
Traceback (most recent call last):
File "c:\Users\Amin\Documents\VSCode\Random Projects\SupermarktStuff\main.py", line 3, in <module>
product = Product('https://www.ah.nl/producten/product/wi193679/lay-s-paprika')
File "c:\Users\Amin\Documents\VSCode\Random Projects\SupermarktStuff\functions.py", line 52, in __init__
raise ProductNotFoundException(url)
functions.ProductNotFoundException: Product with URL https://www.ah.nl/producten/product/wi193679/lay-s-paprika could not be found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.