我想从中提取第二个图片网址:
<div class="product-imagebig"><img itemprop="image" src="https://example.com/300/300.jpg" xoriginal="https://example.com/700/700.jpg" id="prod-img-primary"/></div>
我尝试了但却失败了:
TAG POS=1 TYPE=div ATTR=class:product-imagebig EXTRACT=HTM
SET !VAR1 EVAL("{{!EXTRACT}}.match(/https:\/\/example.com\/700\/.*.jpg/g)")
PROMPT {{!VAR1}}
如何使用imacros提取https://example.com/700/700.jpg?
谢谢。
答案 0 :(得分:2)
以下是如何从def switch_a(variables, timepool, iv, iu , au , av ,b , n , k ):
u, v = variables
zu = (1+iv/k)**n #to simplify equation
zv = (1+ iu/k)**n
u2 = -u + (au/(1+((v/zu)**b)))
print (u, v, iv, iu, au, av, b, n, k)
v2 = -v + (av/(1+((u/zv)**b)))
res = np.array([u2, v2])
return res
args = (iv, iu, au, av, b, n, k)
timepool = np.linspace (1, 50, 50)
solution1a = sp.odeint (switch_a, initial, timepool, args)
变量中提取任意属性的值的示例:
!EXTRACT