#NEWLINE# def get_links( client_id ) : #NEWLINE# #INDENT# headers = { #NEWLINE# #INDENT# 'Authorization' : 'Client-ID {}' . format ( client_id ) , #NEWLINE# #UNINDENT# } #NEWLINE# req = Request ( 'https://api.imgur.com/3/gallery/hot' , headers = headers , method = 'GET' ) #NEWLINE# with urlopen ( req ) as resp : #NEWLINE# #INDENT# data = json . loads ( resp . read ( ) . decode ( 'utf-8' ) ) #NEWLINE# #UNINDENT# return map ( ( lambda item : item [ 'link' ] ) , data [ 'data' ] )