- Web Scraping with Python
- Richard Lawson
- 208字
- 2021-07-09 21:28:50
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "Most websites define a robots.txt
file to let robots know any restrictions about crawling their website."
A block of code is set as follows:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url><loc>http://example.webscraping.com/view/Afghanistan-1</loc></url> <url><loc>http://example.webscraping.com/view/Aland-Islands-2</loc></url> <url><loc>http://example.webscraping.com/view/Albania-3</loc></url> ... </urlset>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
def link_crawler(..., scrape_callback=None): … links = [] if scrape_callback: links.extend(scrape_callback(url, html) or []) ...
Any command-line input or output is written as follows:
$ python performance.py Regular expressions: 5.50 seconds BeautifulSoup: 42.84 seconds Lxml: 7.06 seconds
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: " When regular users open this web page in their browser, they will enter their e-mail and password, and click on the Log In button to submit the details to the server."
- 編程的修煉
- Servlet/JSP深入詳解
- jQuery從入門到精通 (軟件開發視頻大講堂)
- PLC編程及應用實戰
- Python 3破冰人工智能:從入門到實戰
- Learning Hunk
- INSTANT Passbook App Development for iOS How-to
- WebRTC技術詳解:從0到1構建多人視頻會議系統
- 軟件品質之完美管理:實戰經典
- ActionScript 3.0從入門到精通(視頻實戰版)
- 算法設計與分析:基于C++編程語言的描述
- Web編程基礎:HTML5、CSS3、JavaScript(第2版)
- 金融商業數據分析:基于Python和SAS
- AngularJS Web Application Development Cookbook
- PHP從入門到精通(微視頻精編版)