def getUrls(sheet):
 for importrule in (r for r in sheet if (r.type == r.IMPORT_RULE)):
  (yield importrule.href)
 def styleDeclarations(base):
  'recursive generator to find all CSSStyleDeclarations'
  if hasattr(base, 'cssRules'):
   for rule in base.cssRules:
    for s in styleDeclarations(rule):
     (yield s)
  elif hasattr(base, 'style'):
   (yield base.style)
 for style in styleDeclarations(sheet):
  for p in style.getProperties(all=True):
   for v in p.propertyValue:
    if (v.type == 'URI'):
     (yield v.uri)

def getUrls ( sheet ) : for importrule in ( r for r in sheet if ( r . type == r . IMPORT_RULE ) ) : ( yield importrule . href ) def styleDeclarations ( base ) : if hasattr ( base , 'cssRules' ) : for rule in base . cssRules : for s in styleDeclarations ( rule ) : ( yield s ) elif hasattr ( base , 'style' ) : ( yield base . style ) for style in styleDeclarations ( sheet ) : for p in style . getProperties ( all = True ) : for v in p . propertyValue : if ( v . type == 'URI' ) : ( yield v . uri )
retrieve all url values (in e .