#!/usr/local/bin/python3.sh # -*-mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -* import sys import os import traceback from phantompy import Render global LOG import logging import warnings warnings.filterwarnings('ignore') LOG = logging.getLogger() class LookFor(Render): def __init__(self, url, outfile, jsfile=None): self.uri = url Render.__init__(self, url, outfile, jsfile) def ilookfor(self, html): import json marker = '
' if marker not in html: return '' i = html.find(marker) + len(marker) html = html[i:] assert html[0] == '{', html i = html.find('