MCPcopy Index your code
hub / github.com/pyload/pyload / parseURLs

Method parseURLs

module/Api.py:338–354  ·  view source on GitHub ↗

Parses html content or any arbitaty text for links and returns result of `checkURLs` :param html: html source :return:

(self, html=None, url=None)

Source from the content-addressed store, hash-verified

336
337 @permission(PERMS.ADD)
338 def parseURLs(self, html=None, url=None):
339 """Parses html content or any arbitaty text for links and returns result of `checkURLs`
340
341 :param html: html source
342 :return:
343 """
344 urls = []
345
346 if html:
347 urls += [x[0] for x in urlmatcher.findall(html)]
348
349 if url:
350 page = getURL(url)
351 urls += [x[0] for x in urlmatcher.findall(page)]
352
353 # remove duplicates
354 return self.checkURLs(set(urls))
355
356
357 @permission(PERMS.ADD)

Callers

nothing calls this directly

Calls 2

checkURLsMethod · 0.95
getURLFunction · 0.90

Tested by

no test coverage detected