Skip to content

Commit

Permalink
Fix missing imports
Browse files Browse the repository at this point in the history
Remaining actually bad errors, mostly
missing a package or variable in an error
that rarely happens?
  • Loading branch information
ajparsons committed Sep 25, 2024
1 parent 05b75e2 commit 0400af3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions london-mayors-questions/questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def parseQuestionPage(content):
}

# Try parse the actual answers out
answers_object = parseAnswersFromQuestionPage(main_content)
answers_object = parseAnswersFromQuestionPage(main_content, canonical_url)

# Got answers?

Expand All @@ -292,7 +292,7 @@ def parseQuestionPage(content):
return question_object


def parseAnswersFromQuestionPage(page_content):
def parseAnswersFromQuestionPage(page_content, canonical_url):
"""Given page content, see if we can get answers."""

# Look to see if there are any answers given
Expand Down
1 change: 1 addition & 0 deletions pyscraper/new_hansard.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import codecs
import datetime
import io
import os
Expand Down
2 changes: 1 addition & 1 deletion pyscraper/ni/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def time_period(self, ptext, optional=False):
match = re.search("(\d\d?)(?:[.:]\s*(\d\d?))? ?(am|pm|noon|midnight)", ptext)
if not match:
if not optional:
raise ContextException("Time not found in TimePeriod %s" % p)
raise ContextException("Time not found in TimePeriod %s" % ptext)
return None
hour = int(match.group(1))
if hour < 12 and match.group(3) == "pm":
Expand Down
1 change: 1 addition & 0 deletions pyscraper/regmem/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import re
import sys

import miscfuncs
from bs4 import BeautifulSoup
Expand Down
1 change: 1 addition & 0 deletions scripts/add-new-lords
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import datetime
import re
import sys
import urllib.request

from lxml import etree
Expand Down

0 comments on commit 0400af3

Please sign in to comment.