python - Taking only 1 on 3 <tr> -


i'm parsing website extract data in python using xpaths.

but don't know how thing :

<tr> </tr> <tr> </tr> <tr> data </tr> <tr> </tr> <tr> </tr> <tr> data </tr> <tr> </tr> <tr> </tr> <tr> data </tr> 

i know can //tr[3] thrid one. how can thirds ?

use position funxtion , take remainder of division 3. because xpath understand 0 false, can write

//tr[not(position() mod 3)] 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -