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

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()