Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 72887e0

Browse files
Update README.md
1 parent 3b2c8d1 commit 72887e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ Moving on to Wikipedia example, the first step is to look at the HTML markup for
150150
<div id="toc" class="toc">
151151
```
152152
153-
If we simply run `soup.find("div")`, it will return the first div it findssimilar to writing `soup.div`. This needs filtering as we need a specific div. We are lucky in this case as it has an `id `attribute. The following line of code can extract the div element:
153+
If we simply run `soup.find("div")`, it will return the first div it finds - similar to writing `soup.div`. This needs filtering as we need a specific div. We are lucky in this case as it has an `id `attribute. The following line of code can extract the div element:
154154
155155
```python
156156
soup.find("div",id="toc")
157157
```
158158
159-
Note that the second parameter here`id="toc"`. The find method does not have a named parameter `id`, but still this works because of the implementation of the filter using the `**kwargs`.
159+
Note that the second parameter here - `id="toc"`. The find method does not have a named parameter `id`, but still this works because of the implementation of the filter using the `**kwargs`.
160160
161161
Be careful with CSS class though. `class `is a reserved keyword in Python. It cannot be used as a parameter name directly. There are two workarounds – first, just use `class_` instead of `class`. The second workaround is to use a dictionary as the second argument.
162162
@@ -175,7 +175,7 @@ What if we need to find multiple elements?
175175
176176
## Finding Multiple Elements
177177
178-
Consider this scenariothe object is to create a CSV file, which has two columns. The first column contains the heading number and the second column contains the heading text.
178+
Consider this scenario - the object is to create a CSV file, which has two columns. The first column contains the heading number and the second column contains the heading text.
179179
180180
To find multiple columns, we can use `find_all` method.
181181

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /