From 0735bf55ccf4e0773208da1126f0e389097fb404 Mon Sep 17 00:00:00 2001 From: Yomguithereal Date: Wed, 10 Apr 2024 10:55:53 +0200 Subject: [PATCH] Adding --resume to fb user-infos --- docs/cli.md | 4 +++- minet/cli/facebook/__init__.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/cli.md b/docs/cli.md index b3a24ccd72..2552030d4a 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -3323,7 +3323,7 @@ Usage: minet facebook user-infos [-h] [-c COOKIE] [--rcfile RCFILE] [--silent] [--refresh-per-second REFRESH_PER_SECOND] [--simple-progress] [--throttle THROTTLE] [-i INPUT] [--explode EXPLODE] [-s SELECT] - [--total TOTAL] [-o OUTPUT] + [--total TOTAL] [--resume] [-o OUTPUT] user_url_or_user_url_column # Minet Facebook User Infos Command @@ -3361,6 +3361,8 @@ Optional Arguments: -o, --output OUTPUT Path to the output file. Will consider `-` as stdout. If not given, results will also be printed to stdout. + --resume "Whether to resume from an aborted collection. + Need -o to be set. --rcfile RCFILE Custom path to a minet configuration file. More info about this here: https://github.com/medialab/minet/blob/master/do diff --git a/minet/cli/facebook/__init__.py b/minet/cli/facebook/__init__.py index 34aa32f483..534034ba65 100644 --- a/minet/cli/facebook/__init__.py +++ b/minet/cli/facebook/__init__.py @@ -4,6 +4,8 @@ # # Logic of the `fb` action. # +from casanova import RowCountResumer + from minet.cli.argparse import command, ConfigAction # TODO: lazyloading issue @@ -265,6 +267,7 @@ """, variadic_input={"dummy_column": "user_url", "item_label": "user"}, arguments=[*MOBILE_ARGUMENTS], + resumer=RowCountResumer, ) FACEBOOK_COMMAND = command(