made webapp return pattern value, moved js to python, modifying scraping code