Skip to content

Commit a318206

Browse files
authored
Merge pull request #151 from hugovk/https
Fix ssl.CertificateError: hostname 'www.memberguide.gpo.gov' doesn't match 'memberguide.gpo.gov'
2 parents 3fe114d + 9e5323b commit a318206

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you want to quickly grab all images of a particular size without cloning the
3131
[![Build Status](https://travis-ci.org/unitedstates/images.svg?branch=gh-pages)](https://travis-ci.org/unitedstates/images)
3232
[![Coverage Status](https://coveralls.io/repos/unitedstates/images/badge.svg?branch=gh-pages&service=github)](https://coveralls.io/github/unitedstates/images?branch=gh-pages)
3333

34-
This project uses a Python script that scrapes the [Government Printing Office's Member Guide](http://memberguide.gpo.gov/) for official photos of Members of Congress. You can run the script to find and fetch new photos.
34+
This project uses a Python script that scrapes the [Government Printing Office's Member Guide](https://memberguide.gpo.gov/) for official photos of Members of Congress. You can run the script to find and fetch new photos.
3535

3636
Install dependencies with:
3737

scripts/gpo_member_photos.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
"""
4-
Scrape http://memberguide.gpo.gov and
4+
Scrape https://memberguide.gpo.gov and
55
save members' photos named after their Bioguide IDs.
66
"""
77
from __future__ import print_function, unicode_literals
@@ -101,7 +101,7 @@ def save_metadata(bioguide_id):
101101
outfile = os.path.join(outdir, bioguide_id + ".yaml")
102102
with open(outfile, "w") as f:
103103
f.write("name: GPO Member Guide\n")
104-
f.write("link: http://memberguide.gpo.gov\n")
104+
f.write("link: https://memberguide.gpo.gov\n")
105105

106106

107107
def download_file(url, outfile):
@@ -125,7 +125,7 @@ def download_photos(br, photo_list, outdir, delay):
125125
ok = 0
126126

127127
for bioguide_id, photo_filename in photo_list:
128-
photo_url = ("http://www.memberguide.gpo.gov/PictorialImages/" +
128+
photo_url = ("https://memberguide.gpo.gov/PictorialImages/" +
129129
photo_filename)
130130
print(bioguide_id, photo_url)
131131

@@ -153,7 +153,7 @@ def resize_photos():
153153

154154
if __name__ == "__main__":
155155
parser = argparse.ArgumentParser(
156-
description="Scrape http://memberguide.gpo.gov and save "
156+
description="Scrape https://memberguide.gpo.gov and save "
157157
"members' photos named after their Bioguide IDs",
158158
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
159159
parser.add_argument(

0 commit comments

Comments
 (0)