fecgov / fec-eregs

The Federal Election Commission's web-based application that makes regulations easier to find, read and understand.
https://www.fec.gov/regulations/
Other
33 stars 13 forks source link

Fix broken external link (api.fdsys.gov) #446

Open fec-jli opened 5 years ago

fec-jli commented 5 years ago

1)Since last year, all the external links (which point to api.fdsys.gov) in regulation pages were broken. It seems that api.fdsys.gov won't support anymore. ex: for part 1--section 1: https://www.fec.gov/regulations/1-1/2019-annual-1#1-1 the external link : both 5 U.S.C. 552 and 52 U.S.C. 30109 are broken.

2)After searching www.govinfo.gov. we found the correct external link, but the parameter structure changes a lot.

broken link: http://api.fdsys.gov/link?collection=uscode&section=552&title=5&year=mostrecent

new link: https://www.govinfo.gov/app/details/USCODE-2017-title5/USCODE-2017-title5-partI-chap5-subchapII-sec552

3)It looks like no people maintain the regulations-parser repo for almost two years. not sure when they can fix these issues. https://github.com/eregs/regulations-parser

4)We tried to modify our eregs table regcore_layer for column layer with new reference link, not work.

here are the records what we made change:

Part Section Paragraph Code fec-eregs url Current layer New layer Id
1 1-1 1-1-b 5 U.S.C. 552 https://www.fec.gov/regulations/1-1/2018-annual-1#1-1 j${"1-1-b": [{"citationtype": "USC", "components": {"section": "552", "title": "5"}, "locations": [0], "text": "5 U.S.C. 552", "url": "http://api.fdsys.gov_/link?collection=uscode&section=552&title=5&year=mostrecent"}]} j${"1-1-b": [{"citationtype": "USC", "components": {"section": "552", "title": "5"}, "locations": [0], "text": "5 U.S.C. 552", "url": "https://www.govinfo.gov_/app/details/USCODE-2017-title5/USCODE-2017-title5-partI-chap5-subchapII-sec552"}]} 704
1 1-1 1-1-c 5 U.S.C. 552 52 U.S.C. 30109 https://www.fec.gov/regulations/1-1/2018-annual-1#1-1 j${"1-1-c": [{"citationtype": "USC", "components": {"section": "552", "title": "5"}, "locations": [0], "text": "5 U.S.C. 552", "url": "http://api.fdsys.gov_/link?collection=uscode&section=552&title=5&year=mostrecent"}, {"citationtype": "USC", "components": {"section": "30109", "title": "52"}, "locations": [0], "text": "52 U.S.C. 30109", "url": "http://api.fdsys.gov_/link?collection=uscode&section=30109&title=52&year=mostrecent"}]} j${"1-1-c": [{"citationtype": "USC", "components": {"section": "552", "title": "5"}, "locations": [0], "text": "5 U.S.C. 552", "url": "https://www.govinfo.gov_/app/details/USCODE-2017-title5/USCODE-2017-title5-partI-chap5-subchapII-sec552"}, {"citationtype": "USC", "components": {"section": "30109", "title": "52"}, "locations": [0], "text": "52 U.S.C. 30109", "url": "https://www.govinfo.gov_/app/details/USCODE-2017-title52/USCODE-2017-title52-subtitleIII-chap301-subchapI-sec30109"}]} 705
dorothyyeager commented 5 years ago

When we are ready to work on updating the RSS feed link, Jim Jones has gotten the name of someone at GPO for us to work with - just let me know and I'll forward it on.

dorothyyeager commented 5 years ago

Just a note that GPO has implemented a redirect for their RSS feed, and our links are now working as a result. We will still want to figure out a way to get the most recent URL into our pages.