usgpo / bulk-data

User Guides for XML on the govinfo Bulk Data Repository. For information about Bill Status XML Bulk Data, see https://github.com/usgpo/bill-status.
https://www.govinfo.gov/bulkdata
272 stars 100 forks source link

trying to grab FR images #32

Closed AmitElhanan closed 5 years ago

AmitElhanan commented 5 years ago

Hi there, I am trying to grab FR images using image address made available when right clicking the images.

using https://www.federalregister.gov/documents/2018/12/06/2018-26365/airworthiness-directives-the-boeing-company-airplanes as an example I get a url of https://s3.amazonaws.com/images.federalregister.gov/ER06DE18.000/original.png?1543928713 but the image is very dark and when I try to save it to my computer is looks completely black. Are the images available to download somewhere?

Efferon commented 5 years ago

If you inspect the source code you see the page background color is set to #0e0e0e; and hence why it appears dark. To view in a browser, set the background color. The image itself has a transparent background; which means if you right-click image and download then open in a picture editor everything looks proper.

AmitElhanan commented 5 years ago

@Efferon thank you- I swear I tried it before and the image was still being saved as black but then on a different computer it saved just fine. I will try it again tomorrow on the original computer. Thanks again

AmitElhanan commented 5 years ago

I think it's been solved.

jonquandt commented 5 years ago

@AmitElhanan @Efferon -- sorry for the delay in getting back to you. Since you're using the federalregister.gov resource rather than the govinfo one, it may be best to reach out to them. I think the black background is just due to how Amazon S3 file previews are handled, and as @Efferon mentioned, much of the file is transparent.

That being said, here are the equivalent FR resources from our site:

Details page: https://www.govinfo.gov/app/details/FR-2018-12-06/2018-26365

PDF: https://www.govinfo.gov/content/pkg/FR-2018-12-06/pdf/2018-26365.pdf

Those are accessible via the govinfo public API:

https://api.govinfo.gov/packages/FR-2018-12-06/granules/2018-26365/pdf?api_key=DEMO_KEY