Advertisement
mamanegoryu1

Untitled

Apr 1st, 2019
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. def getChildURLs(responseData):
  2.     retVal = []
  3.     if type(responseData['source_type']) is str and responseData['source_type'].split(';')[0] == 'text/html':
  4.         for frameType in ['frame', 'iframe']:
  5.             for frame in sqgHtml.getTags(frameType, doc):
  6.                 if 'src' in dict(frame.attrib) and frame.attrib['src'] != '':
  7.                     src_path = re.sub("\'[a-zA-Z0-9 +]+\'", "", frame.attrib['src'] )
  8.                     retVal += [sqgHtml.checkAbsoluteLink(src_path, responseData['source_url'])]
  9.     return retVal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement