unitedstates / inspectors-general

Collecting reports from Inspectors General across the US federal government.
https://sunlightfoundation.com/blog/2014/11/07/opengov-voices-opening-up-government-reports-through-teamwork-and-open-data/
Creative Commons Zero v1.0 Universal
106 stars 21 forks source link

Check for empty <tr> in pbgc scraper before attempting to set variable b... #173

Closed plantfansam closed 9 years ago

plantfansam commented 9 years ago

Some of the markup on the PBGC site isn't valid (using tr with no slash as a closing tag), which is causing trouble:

            <tr>
                <td  style='border:1px solid #86b2d8;'><a href='pdfs/LTR-2014-09.pdf' target='_blank'>OIG Response to Rep. Turner Request - Delphi Salaried Pension Plan Delays</a></td>
                <td style='border:1px solid #86b2d8;' align='center'>LTR 2014-13</td>
                <td style='border:1px solid #86b2d8;' align='center'>09/02/2014</td>

            <tr>

So this commit just does a check to make sure that the tr has a nested td before doing its thing.

konklone commented 9 years ago

Thanks @handlers! I also went and emailed the PBGC OIG about it.