我有这个:
date = chunk.find_all('a', title=True, class_='tweet-timestamp js-permalink js-nav js-tooltip')
这将返回:
<a class="tweet-timestamp js-permalink js-nav js-tooltip" href="/15colleen/status/537395294133313536" title="3:59 PM - 25 Nov 2014"><span class="_timestamp js-short-timestamp " data-aria-label-part="last" data-long-form="true" data-time="1416959997" data-time-ms="1416959997000">Nov 25</span></a>
显然,
get_text()
返回Nov 25
,但我想要提取片段3:59 PM - 25 Nov 2014
。