Fix the nginx config to work with the new snapshots. Fix the snapshot creator to correctly create the request path.
This commit is contained in:
parent
84b9fdd007
commit
f5e6af37cf
3 changed files with 13 additions and 9 deletions
|
@ -6,11 +6,10 @@ from bs4 import BeautifulSoup
|
|||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
def render_snapshot(path):
|
||||
final_url = 'http://localhost:5000/' + path
|
||||
logger.info('Snapshotting url: %s -> %s' % (path, final_url))
|
||||
def render_snapshot(url):
|
||||
logger.info('Snapshotting url: %s' % url)
|
||||
out_html = subprocess.check_output(['phantomjs', '--ignore-ssl-errors=yes',
|
||||
'util/phantomjs-runner.js', final_url])
|
||||
'util/phantomjs-runner.js', url])
|
||||
|
||||
if not out_html or out_html.strip() == 'Not Found':
|
||||
return None
|
||||
|
|
Reference in a new issue