Skip to content

Commit

Permalink
Merge pull request #610 from biglocalnews/stucka-patch-13
Browse files Browse the repository at this point in the history
Patch HI to work around href position change
  • Loading branch information
stucka authored Feb 6, 2024
2 parents dfdbfdc + 3f184d2 commit b49dc84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions warn/scrapers/hi.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def scrape(

line["PDF url"] = row.select("a")[0].get("href")
line["Company"] = row.select("a")[0].get_text().strip()

# Before 2024, the a href contained the company name. In 2024, it's the date.
if line["Company"] == tempdate:
line["Company"] = row.get_text().strip().replace(tempdate, '').replace('–', '').strip()
masterlist.append(line)

if len(masterlist) == 0:
Expand Down

0 comments on commit b49dc84

Please sign in to comment.