diff --git a/CHANGES b/CHANGES index c8fdcb7..78a1c48 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1.19.5 +------ +- Latest URL analysis fallback. + 1.19.4 ------ - Add global API custom instance setter. diff --git a/intezer_sdk/__init__.py b/intezer_sdk/__init__.py index d81ac8e..7816d82 100644 --- a/intezer_sdk/__init__.py +++ b/intezer_sdk/__init__.py @@ -1 +1 @@ -__version__ = '1.19.4' +__version__ = '1.19.5' diff --git a/intezer_sdk/analysis.py b/intezer_sdk/analysis.py index eb1a86f..7f16078 100644 --- a/intezer_sdk/analysis.py +++ b/intezer_sdk/analysis.py @@ -400,11 +400,12 @@ def from_latest_analysis(cls, api=api) all_analyses_reports = analysis_history_url_result.all() + analyses_ids = [report['analysis_id'] for report in all_analyses_reports - if url in (report['scanned_url'], report['submitted_url'])] + if url in (report.get('scanned_url'), report.get('submitted_url'))] if not analyses_ids and not exact_match: analyses_ids = [report['analysis_id'] for report in all_analyses_reports - if _clean_url(url) in (_clean_url(report['scanned_url']), _clean_url(report['submitted_url']))] + if _clean_url(url) in (_clean_url(report.get('scanned_url', '')), _clean_url(report.get('submitted_url', '')))] if not analyses_ids: return None