class ConfigSiteId(Config): """ Parameters for downloading workers """ site = ParamCreator.create_choice( choice_list=["facebook", "instagram", "travelgirls", "vk", "mamba.ru"], help_string="Which site to download from?", ) user_id = ParamCreator.create_str(help_string="""Which user id to user? https://www.facebook.com/profile.php?id=[user_id] https://www.instagram.com/[user_id] http://www.travelgirls.com/member/[user_id] https://vk.com/id[user_id] http://www.mamba.ru/mb[user_id]""", )
class ConfigDownload(Config): """ Configure details about the download process """ download_as_collecting = ParamCreator.create_bool( help_string="Do you want download while collecting the urls?", default=False, ) download = ParamCreator.create_bool( help_string="really download or just print the urls?", default=True, ) folder = ParamCreator.create_existing_folder( help_string="where to save the data to?", default=".", )
class ConfigDebugRequests(Config): """ Configure how to user the requests module """ debug = ParamCreator.create_bool( help_string="Do you want to debug the requests module?", default=False, )
class ConfigPornhubSearch(Config): """ Parameters for search """ query = ParamCreator.create_str(help_string="What is the query string?", ) use_ordering = ParamCreator.create_bool( help_string="use ordering in the search operation", default=True, ) ordering = ParamCreator.create_choice( choice_list=["longest", "featured", "newest", "mostviewed", "rating"], help_string="by which ordering to fetch result?", default="longest", ) use_period = ParamCreator.create_bool( help_string="use period in the search operation", default=False, ) period = ParamCreator.create_choice( choice_list=["weekly", "monthly", "alltime"], help_string="what period to search?", default="weekly", ) use_tags = ParamCreator.create_bool( help_string="should we use tags in search?", default=False, ) tags = ParamCreator.create_list_str( help_string="tags to be used in search", default=[], ) literal = ParamCreator.create_str( help_string="literal for tags (one character)", default="f", ) limit = ParamCreator.create_int_or_none( help_string="Limit on search results or None for no limit", default=100, )
class ConfigLogging(Config): """ Parameters to control logging """ loglevel = ParamCreator.create_choice( choice_list=[ logging.getLevelName(logging.NOTSET), logging.getLevelName(logging.DEBUG), logging.getLevelName(logging.INFO), logging.getLevelName(logging.WARNING), logging.getLevelName(logging.WARN), logging.getLevelName(logging.ERROR), logging.getLevelName(logging.FATAL), logging.getLevelName(logging.CRITICAL), ], help_string="What log level to use?", default=logging.getLevelName(logging.ERROR), )
class ConfigCookiesSource(Config): """ Configure where to get cookies from """ browser = ParamCreator.create_choice( choice_list=["none", "firefox", "chrome"], help_string="Which browser to take cookies from?", default="firefox", ) cookies = None @classmethod def config_cookies(cls): if ConfigCookiesSource.browser == "firefox": cls.cookies = browser_cookie3.firefox() if ConfigCookiesSource.browser == "chrome": cls.cookies = browser_cookie3.chrome()
class ConfigAll(Config): """ All parameters for the run """ do_ps = ParamCreator.create_bool(default=True, help_string="do postscript?") do_pdf = ParamCreator.create_bool(default=True, help_string="do pdf?") do_debug = ParamCreator.create_bool(default=False, help_string="emit debug info?") unlink_ps = ParamCreator.create_bool( default=False, help_string="unlink the postscript file at the end?") do_qpdf = ParamCreator.create_bool( default=True, help_string="do you want to linearize the pdf file afterwards?") # we should work with warnings and try and solve all of them loglevel = ParamCreator.create_enum( enum_type=LilypondLogLevels, default=LilypondLogLevels.WARNING, help_string="what warning level do you want?", ) do_pdfred = ParamCreator.create_bool( default=False, help_string="should we reduce the pdf size?") # this should be set to True stop_on_output = ParamCreator.create_bool( default=True, help_string="should we stop on any output from the lilypond process?", ) # parameters without defaults (should be supplied by the user on the command line) ps = ParamCreator.create_new_file(help_string="postscript to produce") pdf = ParamCreator.create_new_file(help_string="pdf to produce") out = ParamCreator.create_str(help_string="pdf without suffix") ly = ParamCreator.create_existing_file(help_string="lilypond input")
class ConfigPornhubPornstar(Config): """ Parameters for what pornstar to download """ name = ParamCreator.create_str(help_string="name of the star")
class ConfigYoutubeDl(Config): """ Configuration to download a single url """ url = ParamCreator.create_str(help_string="the URL to download", )