diff options
Diffstat (limited to 'python/markit_red.py')
| -rw-r--r-- | python/markit_red.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/python/markit_red.py b/python/markit_red.py index 1427ed1b..e9c527d2 100644 --- a/python/markit_red.py +++ b/python/markit_red.py @@ -10,12 +10,13 @@ from db import with_connection, dbengine import pandas as pd def request_payload(payload): - r = requests.post('https://www.markit.com/export.jsp', params=payload) + r = requests.post('https://products.markit.com/red/export.jsp', params=payload) res = [] path = os.path.join(os.environ['BASE_DIR'], "Tranche_data", "RED_reports") if 'Delta' in payload['report']: path = os.path.join(path, "Deltas") + breakpoint() with zipfile.ZipFile(io.BytesIO(r.content)) as z: for f in z.namelist(): if f.endswith("xml"): @@ -24,7 +25,7 @@ def request_payload(payload): return res def download_report(report): - version = 10 if 'Entity' in report else 9 + version = 11 if 'Entity' in report else 10 payload = {'user': 'GuillaumeHorel', 'password': 'password', 'version': version, @@ -87,7 +88,4 @@ if __name__ == "__main__": # update_redindices(f[0]) # report_list = ['REDEntity', 'REDObligation', 'REDObligationPreferred'] # for report in report_list: - # download_report(report) - # report_list = ['REDEntityDelta', 'REDObligationDelta'] - # for report in report_list: - # fname = download_report(report) + # next(download_report(report)) |
