From 65391297f66c74bb71c56c2075c52af2aef77d29 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Wed, 12 Jan 2022 21:09:38 +0000 Subject: [PATCH] Move CLI methods to end of class definition for consistent code style --- snscrape/modules/instagram.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/snscrape/modules/instagram.py b/snscrape/modules/instagram.py index 80a70bc..d3e0284 100644 --- a/snscrape/modules/instagram.py +++ b/snscrape/modules/instagram.py @@ -155,14 +155,6 @@ class InstagramUserScraper(_InstagramCommonScraper): self._queryHash = 'f2405b236d85e8296cf30347c9f08c2a' self._variablesFormat = '{{"id":"{pageID}","first":50,"after":"{endCursor}"}}' - @classmethod - def _cli_setup_parser(cls, subparser): - subparser.add_argument('username', type = snscrape.base.nonempty_string('username'), help = 'An Instagram username (no leading @)') - - @classmethod - def _cli_from_args(cls, args): - return cls._cli_construct(args, args.username) - def _get_entity(self): r = self._initial_page() if r.status_code != 200: @@ -196,6 +188,14 @@ class InstagramUserScraper(_InstagramCommonScraper): posts = posts, ) + @classmethod + def _cli_setup_parser(cls, subparser): + subparser.add_argument('username', type = snscrape.base.nonempty_string('username'), help = 'An Instagram username (no leading @)') + + @classmethod + def _cli_from_args(cls, args): + return cls._cli_construct(args, args.username) + class InstagramHashtagScraper(_InstagramCommonScraper): name = 'instagram-hashtag'