lxml視頻講座
Winfortune 01 - How to create an equivalent of fortune and cowsay for Windows, using Python
This will be a program that picks a random quote and displays it on the screen as a "speech bubble" coming out of an animal. You'll see this every time you start the command line interpreter.html
Among the covered subjects:python
- collect quotes from Internet sites
- retrieving HTML
- analyzing HTML, extracting data from it
- store quotes in a database, SQLite
- ASCII art
- integrate this into CMD
- make an installer, WiX
Winfortune 02 - Find a site with quotes we can harvest
The video also provides a very simple explanation of how browsers "talk" to different web-sites.git
Winfortune 03 - XPath experiments and query examples
Winfortune 04 - Python and LXML, examples of XPath queries with Python
How to use Python LXML to perform XPath queries and extract data from HTML pagesgithub
Winfortune 05 - Automate page retrieving via HTTP and HTML parsing with lxml
- YouTube https://www.youtube.com/watch?v=t2fga8_mOcA
Winfortune 05 - Automate page retrieving via HTTP and HTML parsing with lxml
上傳日期:2012年1月21日
This part of the tutorial covers the creation of two primitive functions that will then be used as building blocks in a bigger program.
Winfortune 06 - Python and SQLite tutorial
Further, I explain how to use SQLite with Python to create a database, add records to it and retrieve records from it.web
Winfortune 07 - Joining the building blocks, finally we can harvest all the quotes
Keep in mind that some servers may apply throttling if you're connecting too often and copying a lot of data. Don't forget to be polite and pause every now and then.sql
You should also familiarize with the HTTP status codes and take care of the cases in which some errors occur.windows
Winfortune 08 - ASCII art experiments, listing directories and reading files with Python
- YouTube https://www.youtube.com/watch?v=q0WsWzfy0vA
上傳日期:2012年1月21日
We're getting closer to the desired result. In this tutorial I selected a few ASCII art characters and extended the program such that it can load the ASCII drawings, attach a message to them and print the result on the screen.
So far there are some graphical defects, we'll deal with them in the next tutorial.app
XPath - Quick Tip
Learning BeautifulSoup and Python Requests in ONE VIDEO
Other Links:
Check out my tutorials, blogs and more at my website https://www.hipstercode.com/
-~--~-~~-~-dom
I feel this video could have been better. I have not involved myself with BeautifulSoup in quite some time. I really think it's lack of xpath support is a major detriment.ide
Check out my Podcast on iTunes ... https://itunes.apple.com/us/podcast/c...