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:
yackob03 2013-11-18 19:17:58 -05:00
parent 84b9fdd007
commit f5e6af37cf
3 changed files with 13 additions and 9 deletions

View file

@ -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