
24.11.2021, 14:57
|
|
Флудер
Регистрация: 06.11.2017
Сообщений: 2,759
С нами:
4483143
Репутация:
183
|
|
Сообщение от Apsapeh
Есть ли нормальный способ парсить HTML (в особенности "href" в теге "a")?
Типа такого, только на C++:
Python:
Код:
# link - html документ
response
=
requests
.
get
(
link
)
soup
=
BeautifulSoup
(
response
.
text
,
'lxml'
)
quotes
=
soup
.
find_all
(
"a"
,
id
=
"im"
)
arg_result
.
append
(
quotes
[
0
]
.
get
(
"href"
)
)
GitHub - lexborisov/myhtml: Fast C/C++ HTML 5 Parser. Using threads.
Fast C/C++ HTML 5 Parser. Using threads. Contribute to lexborisov/myhtml development by creating an account on GitHub.
github.com
|
|
|