Results 1 to 3 of 3
Thread: Python?
Hybrid View
-
11th June 2014 15:20 #1Registered User
Join Date: Jul:2001
Location:
Posts: 10,937
Python?
html ( cr/lf)
Code:<html><head>Heading</head><body attr1=''val1''> <div class=''container''> </div> <div class=''node_detail''> <span class=''node_desc''>Part 1</span><br> 1.2 </div> <div class=''node_detail''> <span class=''node_desc''>Part 2</span><br> 2.99 </div></body></html>
10- <div class=''node_detail''> , node_descHTML Code:<head>Heading</head> <body attr1=''val1''> <div class=''container''> </div> <div class=''node_detail''> <span class=''node_desc''>Part 1</span><br> 1.2 </div> <div class=''node_detail''> <span class=''node_desc''>Part 2</span><br> 2.99 </div> </body>
1.2 / 2.99 / .... -
Code:from bs4 import BeautifulSoup html = ' HTML ' parsed = BeautifulSoup(html) result = parsed.body.find('div', attrs={'class':'node_detail'}).text print result Part 1 1.2
...
node_detail?
... Part1
5 , :S
-
12th June 2014 17:19 #2Registered User
Join Date: Jul:2001
Location:
Posts: 10,937
, .
-
12th June 2014 22:31 #3Banned
Join Date: Mar:2008
Location: ᠌᠌᠌᠌
Posts: 992
"",




Reply With Quote
7th May 2023, 16:02 in PC