updating scraper to quit browser when finished

This commit is contained in:
2019-10-05 01:44:47 +01:00
parent e154f6db75
commit 22f8318b8d
3 changed files with 5 additions and 3 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -11,7 +11,7 @@ seedNum = 27
""" Simulation parameters """
# Should we simulate more than once?
setSim = True
simNum = 5000
simNum = 15000
""" Define our data """
# The Statespace
@@ -33,7 +33,7 @@ transitionMatrix = np.array([[0.6, 0.1, 0.3],
initial_dist = np.array([1, 0, 0])
# Steps to run - How many steps or jumps we want the markov chain to make
stepTime = 1
stepTime = 2
# End state you want to find probabilites of - we can estimate the stationary
# distribution by running this many times for many steps.
# E.g to find the stat distribution for L run the simulation 10,000 times

View File

@@ -4,7 +4,7 @@ import emoji
from datetime import datetime
import re
url = 'https://www.trafficdelays.co.uk/a14-traffic-delays/'
url = 'https://www.trafficdelays.co.uk/m62-traffic-delays/'
# prepare the option for the chrome driver
options = webdriver.ChromeOptions()
options.add_argument('headless')
@@ -66,3 +66,5 @@ print(f'Hey Andy, maybe flying would be quicker?'
+ emoji.emojize(f' :helicopter:', use_aliases=True))
print(f'Don\'t fret, he can always work from home!'
+ emoji.emojize(f' :house_with_garden:', use_aliases=True))
browser.quit()