#NEWLINE# def explicit_rel_links( self , rels = ( 'homepage' , 'download' ) ) : #NEWLINE# #INDENT# 'Yields all links with the given relations' #NEWLINE# rels = set ( rels ) #NEWLINE# for anchor in self . parsed . findall ( './/a' ) : #NEWLINE# #INDENT# if ( anchor . get ( 'rel' ) and anchor . get ( 'href' ) ) : #NEWLINE# #INDENT# found_rels = set ( anchor . get ( 'rel' ) . split ( ) ) #NEWLINE# if ( found_rels & rels ) : #NEWLINE# #INDENT# href = anchor . get ( 'href' ) #NEWLINE# url = self . clean_link ( urlparse . urljoin ( self . base_url , href ) ) #NEWLINE# ( yield Link ( url , self , trusted = False ) )