Errata

Web Scraping with Python

Errata for Web Scraping with Python, Third Edition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
O'Reilly learning platform Page Chapter 5
Section titled "Another Serving of BeautifulSoup"

There is a link that yields a Server Not Found error at pythonscraping.com/pages/warandpeace.html

Anonymous  Jun 28, 2024 
ePub Page Regular Expressions and BeautifulSoup
re.compile('..\/img\/gifts/img.*.jpg')

The re.compile pattern benefits from being entered as a raw string.
As written, obtain an error message:
>>>
<>:7: SyntaxWarning: invalid escape sequence '\.'
<>:7: SyntaxWarning: invalid escape sequence '\.'
<<<
Add the lower case r in the following eliminates the error messages:
>>>
re.compile(r'\.\.\/img\/gifts/img.*\.jpg')
<<<

A raw string bonus is not needing to escape the file separator character.

I am using Python 3.12.1.
Thank you for your consideration.

Chris Clark  Jul 21, 2024 
ePub Page Regular Expressions and BeautifulSoup
re.compile('..\/img\/gifts/img.*.jpg')

Thanks for writing and updating your book. It is a very enjoyable way to learn.

The re.compile pattern benefits from being entered as a raw string.
As written, obtain an error message:
>>>
<>:7: SyntaxWarning: invalid escape sequence '\.'
<>:7: SyntaxWarning: invalid escape sequence '\.'
<<<
Add the lowercase r in the following eliminates the error messages:
>>>
re.compile(r'\.\.\/img\/gifts/img.*\.jpg')
<<<

A raw string bonus is not needing to escape the file separator character.

I am using Python 3.12.1.
Thank you for your consideration.

Chris Clark  Jul 22, 2024