2017-02-12 11 views
0

ザ・iが抽出したいコードで不要なテキストを削除:IMACRO javascriptを抽出し、

<*span class='updated'>This user has a bodyguard named <a href='viewprofile.php?username=Username'><b*>Username<*b><*a>! 
You must kill them before you can kill <* href='viewprofile.php?username=Username2'><*b>Username2<*b><*a>!<*span> 

私はこの次のコードを使用し、この抽出物に:

macro_var+="TAG POS=1 TYPE=span ATTR=CLASS:updated EXTRACT=TXT\n"; 

これを抽出します。

This user has a bodyguard namedThis user has a bodyguard namedThis user has a bodyguard namedusername! 
You must kill them before you can killThis user has a bodyguard namedThis user has a bodyguard namedThis user has a bodyguard namedusername! 
You must kill them before you can killThis user has a bodyguard namedThis user has a bodyguard namedThis user has a bodyguard namedusername! 
You must kill them before you can killusername2! 

私が抽出したいのは、< のちょうど "username"です。 B> </B>

答えて

0

'XPATH' 式は、おそらくあなたを助けることがあります。

macro_var+='TAG XPATH="//span[@class=\'updated\'][1]/a[1]" EXTRACT=TXT\n'; 
関連する問題