From 16b88787176bb7b9435083f9739b8c314ad36a8f Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Thu, 7 Nov 2019 20:48:58 +0000 Subject: [PATCH] support directory in export_path --- my/tweets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/my/tweets.py b/my/tweets.py index 6db944c..dd71fde 100755 --- a/my/tweets.py +++ b/my/tweets.py @@ -24,7 +24,11 @@ def _get_export() -> Path: # fallback to my_configuration from . import paths export_path = paths.twitter.export_path - return Path(export_path) + p = Path(export_path) + if p.is_dir(): + return max(p.glob('*.zip')) + else: + return p