xpath: string manipulation
Posted
by
Jindan Zhou
on Stack Overflow
See other posts from Stack Overflow
or by Jindan Zhou
Published on 2013-06-28T21:50:36Z
Indexed on
2013/06/28
22:21 UTC
Read the original article
Hit count: 329
So in my scrapy project I was able to isolate some particular fields, one of the field return something like:
[Rank Info] on 2013-06-27 14:26 Read 174 Times
which was selected by expression:
(//td[@class="show_content"]/text())[4]
I usually do post-processing to extract the datetime information, i.e., 2013-06-27 14:26
Now since I've learned a little more on the xpath substring manipulation, I am wondering if it is even possible to extract that piece of information in the first place, i.e., in the xpath expression itself?
Thanks,
© Stack Overflow or respective owner