如何在Import.io中使用substring()? [英] How to use substring() with Import.io?

查看:165
本文介绍了如何在Import.io中使用substring()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在XPath和import.io方面遇到一些问题,希望您能为我提供帮助. :)

I'm having some issues with XPath and import.io and I hope you'll be able to help me. :)

html代码:

<a href="page.php?var=12345">

目前,我设法使用以下方法提取href的内容( page.php?var = 12345 ):

For the moment, I manage to extract the content of the href ( page.php?var=12345 ) with this:

./td[3]/a[1]/@href

不过,我只想收集: 12345

子字符串可能是解决方案,但是当我使用它时,它似乎在import.io上不起作用...

substring might be the solution but it does not seem to work on import.io as I use it...

substring(./td[3]/a[1]/@href,13)

有什么问题的想法吗?

非常感谢!

推荐答案

尝试将其用于xpath :(将字段选择为文本")

Try using this for the xpath: (Have the field selected as Text)

.//*[@class='oeil']/a/@href

然后将其用于您的正则表达式:

Then use this for your regex:

([^=]*)$

这将为您提供您要查找的ISBN号.

This will get you the ISBN number you are looking for.

import.io仅在返回节点列表时支持XPath中的功能

import.io only support functions in XPath when they return a node list

这篇关于如何在Import.io中使用substring()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆