Skip to content

Commit b7d41b6

Browse files
committed
changed filename to museums_victoria_fetch.py
1 parent 66ccdf9 commit b7d41b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/1-fetch/museums_victoria_fetch.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
LOGGER, PATHS = shared.setup(__file__)
3131

3232
# Constants
33+
BASE_URL = "https://collections.museumsvictoria.com.au/api/search"
3334
FILE_RECORDS = os.path.join(PATHS["data_phase"], "museums_raw.csv")
3435
HEADER_RECORDS = [
3536
"ID",
@@ -38,15 +39,14 @@
3839
"CONTENT LICENCE SHORT NAME",
3940
"MEDIA JSON",
4041
]
42+
MAX_PER_PAGE = 100 # Pagination limit as defined by the API documentation
4143
QUARTER = os.path.basename(PATHS["data_quarter"])
42-
BASE_URL = "https://collections.museumsvictoria.com.au/api/search"
4344
RECORD_TYPES = [
4445
"article",
4546
"item",
4647
"species",
4748
"specimen",
4849
] # Type of record to return
49-
MAX_PER_PAGE = 100 # Pagination limit as defined by the API documentation
5050

5151

5252
def parse_arguments():
@@ -196,7 +196,8 @@ def main():
196196
args = parse_arguments()
197197
shared.paths_log(LOGGER, PATHS)
198198
shared.git_fetch_and_merge(args, PATHS["repo"])
199-
fetch_museums_victoria_data(args, get_requests_session())
199+
session = get_requests_session()
200+
fetch_museums_victoria_data(args, session)
200201
args = shared.git_add_and_commit(
201202
args,
202203
PATHS["repo"],

0 commit comments

Comments
 (0)