#NEWLINE# def get_proxies( ) : #NEWLINE# #INDENT# 'Get available proxies to use with requests library' #NEWLINE# proxies = getproxies ( ) #NEWLINE# filtered_proxies = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , value ) in proxies . items ( ) : #NEWLINE# #INDENT# if key . startswith ( 'http://' ) : #NEWLINE# #INDENT# if ( not value . startswith ( 'http://' ) ) : #NEWLINE# #INDENT# filtered_proxies [ key ] = 'http://{0}' . format ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# filtered_proxies [ key ] = value #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return filtered_proxies