<s> '''<STR_LIT>''' <EOL> import urllib , time <EOL> from resources . lib . libraries import client <EOL> from resources . lib . libraries import control <EOL> def resolve ( url ) : <EOL> try : <EOL> result = client . request ( url ) <EOL> post = { } <EOL> f = client . parseDOM ( result , '<STR_LIT>' , attrs = { '<STR_LIT:name>' : '<STR_LIT>' } ) [ <NUM_LIT:0> ] <EOL> k = client . parseDOM ( f , '<STR_LIT:input>' , ret = '<STR_LIT:name>' , attrs = { '<STR_LIT:type>' : '<STR_LIT>' } ) <EOL> for i in k : post . update ( { i : client . parseDOM ( f , '<STR_LIT:input>' , ret = '<STR_LIT:value>' , attrs = { '<STR_LIT:name>' : i } ) [ <NUM_LIT:0> ] } ) <EOL> post = post <EOL> for i in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> try : <EOL> result = client . request ( url , post = post ) <EOL> url = client . parseDOM ( result , '<STR_LIT>' , attrs = { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> url1 = client . parseDOM ( result , '<STR_LIT:a>' , ret = '<STR_LIT>' ) <EOL> url = [ i for i in url if '<STR_LIT>' in i ] [ <NUM_LIT:0> ] <EOL> url = client . parseDOM ( url , '<STR_LIT:a>' , ret = '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> url = [ '<STR_LIT:http>' + i for i in url . split ( '<STR_LIT:http>' ) if '<STR_LIT>' in i ] [ <NUM_LIT:0> ] <EOL> return url <EOL> except : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> except : <EOL> return <EOL> def check ( url ) : <EOL> try : <EOL> result = client . request ( url ) <EOL> if result == None : return False <EOL> result = client . parseDOM ( result , '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> if any ( '<STR_LIT>' in x for x in result ) : raise Exception ( ) <EOL> return True <EOL> except : <EOL> return False </s>
