Exemple #1
0
def getImageUrlList(url):
  stream = getStream(url)
  data = getCodingContent(stream)
  parser = MyParser()
  parser.feed(data)
  alist = parser.scriptList
  longestStr = longestString(alist)
  var_img = cutTo(longestStr, ';')
  return getImageUrlFromScript(var_img)
Exemple #2
0
def searchResult(url):
  parser = MyParser()
  parser.feed(getCodingContent(getStream(url)))
  block = longestString(parser.scriptList)
  parser.close()
  pattern = re.compile('(?<="listNum":)\d*(?=,)')
  count = pattern.findall(block)
  if count:
    count = int(count[0])
    return count
  return 0