Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
| import lxml.html, urllib2, re | |
| url = "http://www.slv.se/sv/grupp1/Markning-av-mat/Tillsatser-i-mat/E-nummernyckeln---godkanda-tillsatser/" | |
| html = urllib2.urlopen(url).read() | |
| html = html[html.find("<!DOCTYPE"):] | |
| root = lxml.html.fromstring(html) | |
| def extract_text(el): | |
| s = "" | |
| for e in el.itertext(): |
Some exercises from the Falsy Values workshops.
The good parts: