博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
lxml视频讲座
阅读量:4919 次
发布时间:2019-06-11

本文共 3316 字,大约阅读时间需要 11 分钟。

lxml视频讲座

Winfortune 01 - How to create an equivalent of fortune and cowsay for Windows, using Python

  • YouTube
    上传日期:2012年1月21日
    This is the introduction to a series of video tutorials that explain how to create an equivalent of fortune and cowsay for Windows.

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.

Among the covered subjects:

  • 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

  • YouTube
    上传日期:2012年1月21日
    Examine the structure of the pages of a quotes site and find where the data we need are located.

The video also provides a very simple explanation of how browsers "talk" to different web-sites.

Winfortune 03 - XPath experiments and query examples

  • YouTube
    上传日期:2012年1月21日
    Explore the contents of the page and figure out which XPath queries will fetch the data we are looking for.

Winfortune 04 - Python and LXML, examples of XPath queries with Python

  • YouTube

How to use Python LXML to perform XPath queries and extract data from HTML pages

Winfortune 05 - Automate page retrieving via HTTP and HTML parsing with lxml

  • YouTube
    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

  • YouTube
    上传日期:2012年1月21日
    In this very simple example I explain how to devise a database schema for a database of quotes.

Further, I explain how to use SQLite with Python to create a database, add records to it and retrieve records from it.

Winfortune 07 - Joining the building blocks, finally we can harvest all the quotes

  • YouTube
    上传日期:2012年1月21日
    At this point the program is actually ready to retrieve all the quotes from the site.

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.

You should also familiarize with the HTTP status codes and take care of the cases in which some errors occur.

Winfortune 08 - ASCII art experiments, listing directories and reading files with Python

  • YouTube
    上传日期: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.

XPath - Quick Tip

  • YouTube
    2016年1月12日发布
    Using XPath with lxml library.
    Jupyter Notebook: ...

Learning BeautifulSoup and Python Requests in ONE VIDEO

  • YouTube
    2016年7月19日发布
    Sponsors:
    Dev Mountain Coding Bootcamp

Other Links:

Check out my tutorials, blogs and more at my website
-~--~-~~-~-

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.

Check out my Podcast on iTunes ... ...

转载于:https://www.cnblogs.com/duan-qs/p/6285021.html

你可能感兴趣的文章
SecureCrt自动化
查看>>
移动端页面滚动穿透问题解决方案
查看>>
书:《腾讯传》
查看>>
关于jquery中html()、text()、val()的区别
查看>>
设置html title标题左侧的小图标
查看>>
5、事务,索引
查看>>
如何从思维上应对
查看>>
《离散数学》-图论6.9
查看>>
高斯定理的证明
查看>>
Rails插件:CanCan权限验证插件学习总结
查看>>
硬盘坏道修复的方法
查看>>
Heap and Stack
查看>>
C#。总结
查看>>
修改服务器的3389端口
查看>>
greedy算法(python版)
查看>>
编码(4)
查看>>
How to Transfer Audio Output from Mac OS X to Ubuntu via a Network?
查看>>
Hibernate Annotation笔记
查看>>
spring学习-ApplicationContext-spring上下文深入理解
查看>>
日、周、月活跃用户数,用户流失率
查看>>