def parse_arxiv_url(url):
 ix = url.rfind('/')
 idversion = j['id'][(ix + 1):]
 parts = idversion.split('v')
 assert (len(parts) == 2), ('error parsing url ' + url)
 return (parts[0], int(parts[1]))

def parse_arxiv_url ( url ) : ix = url . rfind ( '/' ) idversion = j [ 'id' ] [ ( ix + 1 ) : ] parts = idversion . split ( 'v' ) assert ( len ( parts ) == 2 ) , ( 'error parsing url ' + url ) return ( parts [ 0 ] , int ( parts [ 1 ] ) )
examples is URL we want to extract the raw id and the version .