public static Episode getEpisode ( String urlString ) throws TvDbException { Episode episode = new Episode ( ) ; NodeList nlEpisode ; Node nEpisode ; Element eEpisode ; Document doc = DOMHelper . getEventDocFromUrl ( urlString ) ; if ( doc == null ) { return new Episode ( ) ; } nlEpisode = doc . getElementsByTagName ( EPISODE ) ; for ( int loop = 0 ; loop < nlEpisode . getLength ( ) ; loop ++ ) { nEpisode = nlEpisode . item ( loop ) ; if ( nEpisode . getNodeType ( ) == Node . ELEMENT_NODE ) { eEpisode = ( Element ) nEpisode ; episode = parseNextEpisode ( eEpisode ) ; if ( episode != null ) { // We only need the first episode break ; } } } return episode ; }
Get the episode information from the URL