提取标签 STRONG 中的文本
Extract Text in tag STRONG
是否可以仅使用 CSS NOT xpath
提取强标签中的文本 (Hello World)
<h4 class="inline"> <a href="https://example.com/example"><strong>Hello World</strong></a></h4>
尝试:
response.css(h4.inline a::text).get()
或
response.css(h4.inline a strong::text).get()
是否可以仅使用 CSS NOT xpath
提取强标签中的文本 (Hello World)<h4 class="inline"> <a href="https://example.com/example"><strong>Hello World</strong></a></h4>
尝试:
response.css(h4.inline a::text).get()
或
response.css(h4.inline a strong::text).get()