private SherdogBaseObject getFighter ( Element td ) { Elements name1 = td . select ( "span[itemprop=\"name\"]" ) ; if ( name1 . size ( ) > 0 ) { String name = name1 . get ( 0 ) . html ( ) ; Elements select = td . select ( "a[itemprop=\"url\"]" ) ; if ( select . size ( ) > 0 ) { String url = select . get ( 0 ) . attr ( "abs:href" ) ; SherdogBaseObject fighter = new SherdogBaseObject ( ) ; fighter . setSherdogUrl ( url ) ; fighter . setName ( name ) ; return fighter ; } } return null ; }
Get a fighter