You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4f2a263
Browse filesBrowse the repository at this point in the historyBrowse files
scraping-digital-comics-information-from-comixology/ "Web Scraping with Python
26
-
- Scraping Digital Comics information from Comixology" )
27
-
28
1
原文:[Web Scraping with Python - Scraping Digital Comics information from Comixology](http://felipegalvao.com.br/blog/2016/05/24/web-scraping-with-python-scraping-digital-comics-information-from-comixology/)
29
2
30
3
---
@@ -136,8 +109,7 @@ examples:
136
109
//div | Select all the div elements in the document.
137
110
---|---
138
111
/html | Select the root element html.
139
-
html//p | Select any p element inside the html element, no matter where they
140
-
are.
112
+
html//p | Select any p element inside the html element, no matter where they are.
141
113
html/div | Select the div elements that are children of the html element.
142
114
143
115
You can also combine elements and attributes for the selection. To extract the
@@ -146,10 +118,8 @@ features that we will use the most. Let's see:
146
118
147
119
//@class | Select all the class attributes in the document.
148
120
---|---
149
-
//div[@class='style-div']/p | Select all the p elements that are children of
150
-
div elements with a class value of "style-div".
151
-
//p[@id='p-paragraph']/text() | Select the text inside each p element with an
152
-
id value of "p-paragraph".
121
+
//div[@class='style-div']/p | Select all the p elements that are children of div elements with a class value of "style-div".
122
+
//p[@id='p-paragraph']/text() | Select the text inside each p element with an id value of "p-paragraph".
153
123
154
124
I uploaded a simple HTML file so we can construct the code in Python and check
155
125
these examples in practice. The address of the page is:
0 commit comments