-
Notifications
You must be signed in to change notification settings - Fork 1
/
BG_indiv_params.py
22 lines (12 loc) · 2.35 KB
/
BG_indiv_params.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import requests, json
cem_codes = ['46623', '46605', '279263', '132644', '132606', '46623', '260594', '46629', '46632', '46636', '280136', '46637', '132714', '175553', '46668', '46675', '46678', '165793', '46682', '132750', '46685', '46690', '46693', '46706', '46720', '264002', '46755', '47679', '163399', '273109', '178912', '178920', '46783', '46788', '46792', '174865', '277992', '219252', '46807', '46809', '160299', '46820', '132652', '46828', '46829', '46831', '46832', '178230', '260435', '46851', '263413', '46874', '46881', '178238', '264006', '260608', '46925', '46934', '147073', '46953', '264008', '278002', '47647', '269982', '46965', '132615', '46969', '46991', '46993', '147589', '147558', '260981', '132684', '132570', '47027', '47029', '264004', '278077', '47047', '132641', '178922', '280697', '47650', '277980', '47086', '47095', '278934', '260571', '132800', '162680', '47651', '47126', '47128', '47130', '260968', '47147', '132706', '174999', '160758', '278421', '163395', '219184', '163963', '47170', '47177', '47179', '47635', '47182', '47184', '47185', '163251', '279262', '47203', '47220', '132813', '178917', '47236', '47240', '47241', '176968', '274709', '47256', '279938', '47653', '275307', '132661', '178923', '47275', '47284', '47286', '47293', '47294', '47299', '47302', '132662', '47317', '47334', '47347', '132592', '47355', '132710', '273268', '47355', '132710', '47365', '47370', '47371', '47372', '47374', '47380', '47381', '47385', '47389', '47678', '132663', '47407', '47408', '219050', '264011', '162167', '132732', '178921', '132628', '174934', '178916', '46801', '260972', '132838', '47476', '280394', '174897', '47493', '219189', '47509', '280375', '278713', '47517', '47521', '47527', '47533', '147922', '47700', '260975', '278076', '47205', '47563', '47565', '47568', '47571', '273262', '178919', '47648', '47605', '47610', '47614', '47615', '47616', '47620', '132632', '260964']
all_records = []
for c in cem_codes:
payload = {'action': 'browse', 'cemetery_id': c, 'lim': '0', 'num': '100'}
indiv_data = requests.get('http://billiongraves.com/pages/cemetery/scripts/searchCemeteryRecords.php', params=payload)
people_data = json.loads(indiv_data.text)
for record in people_data['records']:
all_records.append(record)
with open('people_data_n100.json', 'w') as outfile:
json.dump(all_records, outfile, indent=4)
#print(indiv_data.status_code)