Skip to content

Commit

Permalink
rename & replace single quotes with double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
geeseven committed Sep 24, 2020
1 parent 8936a0e commit f0698c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions KXAN_allergy_report → KXAN_allergy_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from rich.console import Console
from rich.table import Table

url = 'https://media.kxan.com/nxs-kxantv-media-us-east-1/oembed/wx_embed/allergy/allergy_v3.5.js' # noqa: E501
url = "https://media.kxan.com/nxs-kxantv-media-us-east-1/oembed/wx_embed/allergy/allergy_v3.5.js" # noqa: E501

site = get(url, allow_redirects=False, timeout=(3.05, 27))

Expand All @@ -15,13 +15,13 @@
allergies = findall(allergy_regex, site.text)
date = findall(date_regex, site.text)

table = Table(title='KXAN allergy report from {}'.format(date[0]))
table.add_column('allergen')
table.add_column('severity')
table = Table(title="KXAN allergy report from {}".format(date[0]))
table.add_column("allergen")
table.add_column("severity")

for item in sorted(allergies):
# change formatting from 'Oak - High' to ['Oak', 'High']
i = item.split(' - ')
i = item.split(" - ")
table.add_row(i[0], i[1])

Console().print(table)

0 comments on commit f0698c1

Please sign in to comment.