Разбор HTML с BeautifulSoup
(Картинка маленькая, вот еще одна ссылка:http://i.imgur.com/OJC0A.png)I»
Я пытаюсь извлечь текст обзора внизу. Я'мы пробовали это:
y = soup.find_all("div", style = "margin-left:0.5em;")
review = y[0].text
Проблема в том, что в нерасширенном виде есть нежелательный текстdiv
теги, которые становится утомительным, чтобы удалить из содержания обзора. Ради жизни я просто могуне могу понять это. Может ли кто-нибудь помочь мне?
Изменить: HTML-код:
div style="margin-left:0.5em;">
9 of 35 people found the following review helpful
That is true. I tried it myself this morning. There's a little note on the Audible site that says "a few titles will require two credits" or something like that. A Dance with Dragons is one of those few.
Тег div над текстом выглядит следующим образом:
<span class="h3color tiny">This review is from: </span>
<a href="https://rads.stackoverflow.com/amzn/click/com/B005C7QVUE" rel="nofollow noreferrer">A Dance with Dragons: A Song of Ice and Fire: Book 5 (Audible Audio Edition)</a>
That is true. I tried it myself this morning. There's a little note on the Audible site that says "a few titles will require two credits" or something like that. A Dance with Dragons is one of those few.