Skip to content

Commit

Permalink
fixes aps fullname extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
andobolocco committed Jun 22, 2020
1 parent 97355d3 commit 2129f88
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/documentTypes/apsBill.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ module.exports = {
&& !line.match(/\d+/g)
));
if (!fullName) {
fullName = rawText.slice(lineWithCityStateZipCodeIndex - 5, lineWithCityStateZipCodeIndex + 5)
.filter((line) => (
line.indexOf(' ') >= 0
&& line.toUpperCase() === line
&& !line.match(/Total amount paid/gi)
&& !line.match(/News from APS/gi)
&& !line.match(/Things you need to know/gi)
&& !line.match(/Visit aps/gi)
&& !line.match(/Pay 24 hours/gi)
&& !line.match(/Download our free/gi)
)).find((line) => !line.match(/\d+/g));
fullName = rawText[lineWithCityStateZipCodeIndex - 2];
}

Expand Down

0 comments on commit 2129f88

Please sign in to comment.