BeautifulSoup and lxml.html – what to prefer?

The simple answer, imo, is that if you trust your source to be well-formed, go with the lxml solution. Otherwise, BeautifulSoup all the way. Edit: This answer is three years old now; it’s worth noting, as Jonathan Vanasco does in the comments, that BeautifulSoup4 now supports using lxml as the internal parser, so you can … Read more

Flask example with POST

Before actually answering your question: Parameters in a URL (e.g. key=listOfUsers/user1) are GET parameters and you shouldn’t be using them for POST requests. A quick explanation of the difference between GET and POST can be found here. In your case, to make use of REST principles, you should probably have: Then, on each URL, you can define the behaviour of different … Read more