Table of Contents

Ensure Whitelabelling MSA-102

White labeling of bill statuses that are usually hosted on .gov sites but instead are only available on TrendTrack.com so that Kevin's clients are taken to MainStreetAdvocates.com

Many URL's from the feed are replaced with local URL's to cached content.

How the edge-cases are handled is not yet documented.

Context

Kevin confirmed this is an exception for MA. The way this works for most bills is...

  • StateTrack xml feed includes a bill/reg URL to state-track and a status URL, also to state-track
  • The Bill text is cached on MSA
  • The cached bill includes a link "Redirect to state status page"
  • The status URL is usually a link to a state-hosted website, e.g. http://capitol.hawaii.gov/measure_indiv.aspx?billtype=HB&billnumber=4&year=2017
  • In the case of MA (and maybe one or two others?) the state does not have a public URL. StateTrack uses scraping and serves the status from their own site (trendtrack.com).

Requirement

After fetching the bill text, check the result for a link to trendtrack.com. If present, then follow the link and also cache the status. Replace the link with the local URL.