ofscraper 3.10.dev1__tar.gz → 3.10.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/PKG-INFO +1 -1
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/sessionmanager.py +10 -8
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/check.py +1 -1
- ofscraper-3.10.dev4/ofscraper/commands/helpers/context.py +147 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/manual.py +2 -2
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/metadata.py +2 -5
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/scraper/actions/download.py +1 -1
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/scraper/actions/like.py +49 -20
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/scraper/runner.py +15 -50
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/constants.py +2 -0
- ofscraper-3.10.dev4/ofscraper/const/values/like.py +10 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/merge.py +1 -1
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/download.py +5 -6
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/downloadbatch.py +3 -9
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/downloadnormal.py +5 -10
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/log.py +20 -11
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/media/helpers.py +18 -8
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/media/main.py +2 -2
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/console.py +2 -2
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/context/exit.py +1 -1
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/groups.py +4 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/screens.py +39 -21
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/updater.py +2 -2
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/classes.py +14 -3
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/other.py +1 -1
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/stdout.py +6 -5
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/pyproject.toml +1 -1
- ofscraper-3.10.dev1/ofscraper/commands/helpers/context.py +0 -104
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/LICENSE +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/README.md +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/__main__.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/__version__.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/__version__.pye +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/archive.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/common/logs.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/highlights.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/init.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/labels.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/me.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/messages.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/paid.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/pinned.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/profile.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/subscriptions/helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/subscriptions/individual.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/subscriptions/lists.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/subscriptions/subscriptions.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/api/timeline.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/base.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/labels.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/media.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/models.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/multiprocessprogress.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/placeholder.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/posts.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/button.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/boolfield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/datefield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/mediafield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/numfield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/pricefield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/responsefield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/selectfield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/textsearch.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/fields/timefield.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/inputs/filterinput.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/inputs/intergerinput.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/inputs/strinput.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/row_names.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/status.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/table.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/classes/table/table_console.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/helpers/picker.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/helpers/shared.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/helpers/strings.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/scraper/post.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/scraper/scrape_context.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/commands/scraper/scraper.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/binary.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/config.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/date.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/download.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/files.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/general.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/live.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/logger.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/metadata.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/other_url.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/path.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/prompts.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/req.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/table.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/test_constants.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/time.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/const/values/url.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/__init__.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/labels.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/media.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/messages.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/others.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/posts.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/profile.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/stories.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/db/operations_/wrapper.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/alt_download.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/alt_downloadbatch.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/main_download.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/main_downloadbatch.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/classes/retries.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/classes/session.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/common/alt_common.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/common/general.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/common/main_common.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/globals.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/keyhelpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/media.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/message.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/metadata.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/paths.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/progress.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/download/shared/utils/text.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/date.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/flags.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/other.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/price.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/sort.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/filters/models/subtype.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/models/retriver.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/models/selector.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/helpers/model_helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/helpers/prompt_helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/keybindings.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/promptConvert.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/actions.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/area.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/auth.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/binary.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/config.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/menu.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/merge.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/model.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_groups/profile.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_strings.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompt_validators.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/prompts/prompts.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/runner/exit.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/runner/load.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/runner/run.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/__init__.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/actions.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/advanced_processing.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/advanced_program.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/advanced_user_filter.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/automatic.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/content.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/download.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/file.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/logging.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/media_type.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/program.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/user_list.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/user_select.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/arguments/user_sort.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/advanced_common.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/common.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/main.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/manual.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/message_check.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/metadata.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/paid_check.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/post_check.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/bundles/story_check.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/main.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/manual.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/message.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/metadata.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/paid.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/post.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/commands/story.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/globals.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/groups/common_args.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/helpers/areas.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/helpers/before.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/helpers/check.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/helpers/date.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/helpers/type.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/output.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/parse.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/quality.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/read.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/user.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/args/write.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/context.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/data.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/file.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/make.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/request.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/auth/schema.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/binaries.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/cache.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/checkers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/config.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/context.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/custom.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/data.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/file.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/menu.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/schema.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/config/wrapper.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/constants.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/context/run_async.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/context/stdout.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/dates.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/encoding.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/hash.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/empty.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/live.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/panel.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/progress.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/live/tasks.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/close.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/globals.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/handle.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/helpers.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/logger.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/logs/logs.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/manager.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/me.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/menu.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/merge.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/paths/check.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/paths/common.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/paths/manage.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/paths/paths.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/profiles/data.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/profiles/manage.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/profiles/tools.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/run.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/sems.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/separate.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/settings.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/system/free.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/system/network.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/system/system.py +0 -0
- {ofscraper-3.10.dev1 → ofscraper-3.10.dev4}/ofscraper/utils/text.py +0 -0
|
@@ -40,11 +40,13 @@ def is_rate_limited(exception):
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class SessionSleep:
|
|
43
|
-
def __init__(self, sleep=None):
|
|
44
|
-
self._sleep =
|
|
45
|
-
self._init_sleep = sleep
|
|
43
|
+
def __init__(self, sleep=None,difmin=None):
|
|
44
|
+
self._sleep = None
|
|
45
|
+
self._init_sleep = sleep
|
|
46
46
|
self._last_date = arrow.now()
|
|
47
|
+
self._difmin=difmin if difmin!=None else constants.getattr("SESSION_SLEEP_INCREASE_TIME_DIFF")
|
|
47
48
|
self._alock = asyncio.Lock()
|
|
49
|
+
|
|
48
50
|
|
|
49
51
|
def reset_sleep(self):
|
|
50
52
|
self._sleep = self._init_sleep
|
|
@@ -56,13 +58,12 @@ class SessionSleep:
|
|
|
56
58
|
|
|
57
59
|
def toomany_req(self):
|
|
58
60
|
log = logging.getLogger("shared")
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
self._sleep = constants.getattr("SESSION_SLEEP_INIT")
|
|
61
|
+
if not self._sleep:
|
|
62
|
+
self._sleep = self._init_sleep if self._init_sleep else constants.getattr("SESSION_SLEEP_INIT")
|
|
62
63
|
log.debug(f"too many req => setting sleep to init [{self._sleep} seconds]")
|
|
63
|
-
elif arrow.now().float_timestamp - self._last_date.float_timestamp <
|
|
64
|
+
elif arrow.now().float_timestamp - self._last_date.float_timestamp < self._difmin:
|
|
64
65
|
log.debug(
|
|
65
|
-
f"too many req => not changing sleep [{self._sleep} seconds] because last call less than {
|
|
66
|
+
f"too many req => not changing sleep [{self._sleep} seconds] because last call less than {self._difmin} seconds"
|
|
66
67
|
)
|
|
67
68
|
return self._sleep
|
|
68
69
|
else:
|
|
@@ -357,6 +358,7 @@ class sessionManager:
|
|
|
357
358
|
except Exception as E:
|
|
358
359
|
if is_rate_limited(E):
|
|
359
360
|
sleeper.toomany_req()
|
|
361
|
+
|
|
360
362
|
log.traceback_(E)
|
|
361
363
|
log.traceback_(traceback.format_exc())
|
|
362
364
|
sync_sem.release()
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import traceback
|
|
3
|
+
from itertools import chain
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import ofscraper.models.selector as selector
|
|
8
|
+
import ofscraper.utils.args.helpers.areas as areas
|
|
9
|
+
import ofscraper.utils.args.read as read_args
|
|
10
|
+
import ofscraper.utils.constants as constants
|
|
11
|
+
import ofscraper.utils.live.screens as progress_utils
|
|
12
|
+
from ofscraper.commands.scraper.post import post_media_process
|
|
13
|
+
|
|
14
|
+
from ofscraper.commands.helpers.strings import (
|
|
15
|
+
area_str,
|
|
16
|
+
avatar_str,
|
|
17
|
+
data_str,
|
|
18
|
+
progress_str,
|
|
19
|
+
)
|
|
20
|
+
log = logging.getLogger("shared")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_user_action_function(func):
|
|
24
|
+
async def wrapper(userdata,session,*args, **kwargs):
|
|
25
|
+
async with session as c:
|
|
26
|
+
data=[]
|
|
27
|
+
for ele in userdata:
|
|
28
|
+
try:
|
|
29
|
+
with progress_utils.setup_api_split_progress_live():
|
|
30
|
+
all_media, posts, like_posts = await post_media_process(ele, c=c)
|
|
31
|
+
with progress_utils.setup_activity_counter_live(revert=False):
|
|
32
|
+
avatar = ele.avatar
|
|
33
|
+
if (
|
|
34
|
+
constants.getattr("SHOW_AVATAR")
|
|
35
|
+
and avatar
|
|
36
|
+
and read_args.retriveArgs ().userfirst
|
|
37
|
+
):
|
|
38
|
+
logging.getLogger("shared_other").warning(avatar_str.format(avatar=avatar))
|
|
39
|
+
data_helper(ele)
|
|
40
|
+
data.append(await func(all_media, posts, like_posts,ele=ele))
|
|
41
|
+
except Exception as e:
|
|
42
|
+
|
|
43
|
+
log.traceback_(f"failed with exception: {e}")
|
|
44
|
+
log.traceback_(traceback.format_exc())
|
|
45
|
+
|
|
46
|
+
if isinstance(e, KeyboardInterrupt):
|
|
47
|
+
raise e
|
|
48
|
+
finally:
|
|
49
|
+
progress_utils.increment_user_activity()
|
|
50
|
+
records=chain.from_iterable(data)
|
|
51
|
+
if len(records)<2:
|
|
52
|
+
return
|
|
53
|
+
for record in records:
|
|
54
|
+
log.warning(record)
|
|
55
|
+
|
|
56
|
+
return wrapper
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def get_userfirst_data_function(funct):
|
|
62
|
+
async def wrapper(userdata, session, *args, **kwargs):
|
|
63
|
+
progress_utils.update_activity_task(description="Getting all user data first")
|
|
64
|
+
progress_utils.update_user_activity(description="Users with Data Retrieved")
|
|
65
|
+
progress_utils.update_activity_count(description="Overall progress", total=2)
|
|
66
|
+
data = {}
|
|
67
|
+
async with session:
|
|
68
|
+
for ele in userdata:
|
|
69
|
+
try:
|
|
70
|
+
data_helper(ele)
|
|
71
|
+
with progress_utils.setup_activity_counter_live(revert=False):
|
|
72
|
+
data.update(await funct(session, ele))
|
|
73
|
+
except Exception as e:
|
|
74
|
+
log.traceback_(f"failed with exception: {e}")
|
|
75
|
+
log.traceback_(traceback.format_exc())
|
|
76
|
+
if isinstance(e, KeyboardInterrupt):
|
|
77
|
+
raise e
|
|
78
|
+
finally:
|
|
79
|
+
session.reset_sleep()
|
|
80
|
+
progress_utils.increment_user_activity()
|
|
81
|
+
return data
|
|
82
|
+
|
|
83
|
+
return wrapper
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def get_userfirst_action_execution_function(funct):
|
|
87
|
+
async def wrapper(data,*args, **kwargs):
|
|
88
|
+
progress_utils.increment_activity_count(total=2)
|
|
89
|
+
try:
|
|
90
|
+
progress_utils.update_user_activity(total=len(data.items()))
|
|
91
|
+
for _, val in data.items():
|
|
92
|
+
all_media = val["media"]
|
|
93
|
+
posts = val["posts"]
|
|
94
|
+
like_posts = val["like_posts"]
|
|
95
|
+
ele = val["ele"]
|
|
96
|
+
avatar = ele.avatar
|
|
97
|
+
if (
|
|
98
|
+
constants.getattr("SHOW_AVATAR")
|
|
99
|
+
and avatar
|
|
100
|
+
and read_args.retriveArgs().userfirst
|
|
101
|
+
):
|
|
102
|
+
logging.getLogger("shared_other").warning(avatar_str.format(avatar=avatar))
|
|
103
|
+
try:
|
|
104
|
+
with progress_utils.setup_activity_counter_live(revert=False):
|
|
105
|
+
await funct(all_media, posts, like_posts,*args, ele=ele,**kwargs)
|
|
106
|
+
except Exception as e:
|
|
107
|
+
log.traceback_(f"failed with exception: {e}")
|
|
108
|
+
log.traceback_(traceback.format_exc())
|
|
109
|
+
if isinstance(e, KeyboardInterrupt):
|
|
110
|
+
raise e
|
|
111
|
+
finally:
|
|
112
|
+
progress_utils.increment_user_activity()
|
|
113
|
+
except Exception as e:
|
|
114
|
+
log.traceback_(f"failed with exception: {e}")
|
|
115
|
+
log.traceback_(traceback.format_exc())
|
|
116
|
+
if isinstance(e, KeyboardInterrupt):
|
|
117
|
+
raise e
|
|
118
|
+
finally:
|
|
119
|
+
progress_utils.increment_activity_count(description="Overall progress", total=2)
|
|
120
|
+
|
|
121
|
+
return wrapper
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def data_helper(user):
|
|
126
|
+
avatar = user.avatar
|
|
127
|
+
username = user.name
|
|
128
|
+
active = user.active
|
|
129
|
+
final_post_areas = areas.get_final_posts_area()
|
|
130
|
+
length = selector.get_num_selected()
|
|
131
|
+
count = progress_utils.get_user_task_obj().completed
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
logging.getLogger("shared_other").warning(
|
|
135
|
+
progress_str.format(count=count + 1, length=length)
|
|
136
|
+
)
|
|
137
|
+
logging.getLogger("shared_other").warning(data_str.format(name=username))
|
|
138
|
+
if constants.getattr("SHOW_AVATAR") and avatar:
|
|
139
|
+
logging.getLogger("shared_other").warning(avatar_str.format(avatar=avatar))
|
|
140
|
+
progress_utils.update_activity_task(
|
|
141
|
+
description=area_str.format(
|
|
142
|
+
areas=",".join(final_post_areas), name=username, active=active
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
logging.getLogger("shared_other").info(
|
|
146
|
+
area_str.format(areas=",".join(final_post_areas), name=username, active=active)
|
|
147
|
+
)
|
|
@@ -30,7 +30,7 @@ def manual_download(urls=None):
|
|
|
30
30
|
network.check_cdm()
|
|
31
31
|
allow_manual_dupes()
|
|
32
32
|
url_dicts = process_urls(urls)
|
|
33
|
-
with progress_utils.
|
|
33
|
+
with progress_utils.setup_activity_progress_live():
|
|
34
34
|
progress_utils.update_activity_task(
|
|
35
35
|
description="Getting data from retrived posts"
|
|
36
36
|
)
|
|
@@ -51,7 +51,7 @@ def manual_download(urls=None):
|
|
|
51
51
|
set_user_data(url_dicts)
|
|
52
52
|
|
|
53
53
|
for _, value in url_dicts.items():
|
|
54
|
-
with progress_utils.
|
|
54
|
+
with progress_utils.setup_activity_progress_live():
|
|
55
55
|
model_id = value.get("model_id")
|
|
56
56
|
username = value.get("username")
|
|
57
57
|
model_id = value.get("model_id")
|
|
@@ -32,7 +32,6 @@ import ofscraper.utils.live.screens as progress_utils
|
|
|
32
32
|
import ofscraper.utils.profiles.tools as profile_tools
|
|
33
33
|
from ofscraper.__version__ import __version__
|
|
34
34
|
from ofscraper.commands.helpers.context import (
|
|
35
|
-
get_user_action_execution_function,
|
|
36
35
|
get_user_action_function,
|
|
37
36
|
get_userfirst_action_execution_function,
|
|
38
37
|
get_userfirst_data_function,
|
|
@@ -53,7 +52,7 @@ log = logging.getLogger("shared")
|
|
|
53
52
|
|
|
54
53
|
|
|
55
54
|
def metadata():
|
|
56
|
-
with progress_utils.
|
|
55
|
+
with progress_utils.setup_activity_progress_live(stop=True):
|
|
57
56
|
if read_args.retriveArgs().scrape_paid:
|
|
58
57
|
progress_utils.update_activity_task(
|
|
59
58
|
description="Updating Metadata for Entire Paid page"
|
|
@@ -189,8 +188,6 @@ async def execute_metadata_action_user_first(data):
|
|
|
189
188
|
await get_user_action_execution_function(execute_metadata_action_on_user)(
|
|
190
189
|
media=media, user=ele
|
|
191
190
|
)
|
|
192
|
-
# await download.download_process(username, model_id, filterMedia)
|
|
193
|
-
# metadata_stray_media(username, model_id, media)
|
|
194
191
|
except Exception as e:
|
|
195
192
|
if isinstance(e, KeyboardInterrupt):
|
|
196
193
|
raise e
|
|
@@ -251,7 +248,7 @@ def process_selected_areas():
|
|
|
251
248
|
log.debug("[bold blue] Running Metadata Mode [/bold blue]")
|
|
252
249
|
force_change_download()
|
|
253
250
|
with scrape_context_manager():
|
|
254
|
-
with progress_utils.
|
|
251
|
+
with progress_utils.setup_activity_progress_live(stop=True):
|
|
255
252
|
if read_args.retriveArgs().metadata:
|
|
256
253
|
metadata()
|
|
257
254
|
|
|
@@ -31,7 +31,7 @@ async def downloader(ele=None, posts=None, media=None, **kwargs):
|
|
|
31
31
|
username = ele.name
|
|
32
32
|
progress_utils.update_activity_task(description=download_str.format(name=username))
|
|
33
33
|
logging.getLogger("shared_other").warning(download_str.format(name=username))
|
|
34
|
-
await download.download_process(username, model_id, media, posts=posts)
|
|
34
|
+
return await download.download_process(username, model_id, media, posts=posts)
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@run
|
|
@@ -21,6 +21,9 @@ import ofscraper.utils.cache as cache
|
|
|
21
21
|
import ofscraper.utils.constants as constants
|
|
22
22
|
import ofscraper.utils.context.exit as exit
|
|
23
23
|
import ofscraper.utils.live.screens as progress_utils
|
|
24
|
+
from rich.markup import escape
|
|
25
|
+
from rich.text import Text
|
|
26
|
+
|
|
24
27
|
|
|
25
28
|
log = logging.getLogger("shared")
|
|
26
29
|
like_str = "Performing Like Action on {name}"
|
|
@@ -35,7 +38,7 @@ def process_like(posts=None, model_id=None, task=None, username=None, **kwargs):
|
|
|
35
38
|
unfavorited_posts = get_posts_for_like(posts)
|
|
36
39
|
posts = pre_filter(posts)
|
|
37
40
|
post_ids = get_post_ids(unfavorited_posts)
|
|
38
|
-
like(model_id, post_ids)
|
|
41
|
+
return like(model_id, username,post_ids)
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
@exit.exit_wrapper
|
|
@@ -46,7 +49,7 @@ def process_unlike(posts=None, model_id=None, task=None, username=None, **kwargs
|
|
|
46
49
|
favorited_posts = get_posts_for_unlike(posts)
|
|
47
50
|
posts = pre_filter(posts)
|
|
48
51
|
post_ids = get_post_ids(favorited_posts)
|
|
49
|
-
unlike(model_id, post_ids)
|
|
52
|
+
return unlike(model_id, username,post_ids)
|
|
50
53
|
|
|
51
54
|
|
|
52
55
|
def get_posts_for_unlike(post):
|
|
@@ -82,15 +85,15 @@ def get_post_ids(posts: list) -> list:
|
|
|
82
85
|
return list(map(lambda x: x.id, posts))
|
|
83
86
|
|
|
84
87
|
|
|
85
|
-
def like(model_id, ids: list):
|
|
86
|
-
|
|
88
|
+
def like(model_id, username,ids: list):
|
|
89
|
+
return _like(model_id,username, ids, True)
|
|
87
90
|
|
|
88
91
|
|
|
89
|
-
def unlike(model_id, ids: list):
|
|
90
|
-
_like(model_id, ids, False)
|
|
92
|
+
def unlike(model_id,username, ids: list):
|
|
93
|
+
return _like(model_id, username,ids, False)
|
|
91
94
|
|
|
92
95
|
|
|
93
|
-
def _like(model_id, ids: list, like_action: bool):
|
|
96
|
+
def _like(model_id, username,ids: list, like_action: bool):
|
|
94
97
|
like_str = (
|
|
95
98
|
"Posts toggled from unlike to like...\n"
|
|
96
99
|
if like_action
|
|
@@ -112,44 +115,67 @@ def _like(model_id, ids: list, like_action: bool):
|
|
|
112
115
|
|
|
113
116
|
[tasks.append(functools.partial(like_func, c, id, model_id)) for id in ids]
|
|
114
117
|
count = 1
|
|
118
|
+
|
|
119
|
+
stable_sleep_duration=constants.getattr("STABLE_SLEEP_DURATION_LIKE")
|
|
120
|
+
sleep_duration_50=constants.getattr("SLEEP_DURATION_LIKE_50")
|
|
121
|
+
sleep_duration_60=constants.getattr("SLEEP_DURATION_LIKE_60")
|
|
122
|
+
sleep_duration_common=constants.getattr("COMMON_MULTIPLE_SLEEP_DURATION_LIKE")
|
|
123
|
+
|
|
115
124
|
for count, func in enumerate(tasks):
|
|
116
125
|
out = func()
|
|
117
126
|
if out == 0:
|
|
118
127
|
sleep_duration = 0
|
|
119
128
|
elif count + 1 % 60 == 0 and count + 1 % 50 == 0:
|
|
120
|
-
sleep_duration =
|
|
129
|
+
sleep_duration = sleep_duration_common
|
|
121
130
|
elif count % 60 == 0:
|
|
122
|
-
sleep_duration =
|
|
131
|
+
sleep_duration = sleep_duration_60 # Divisible by 60 - 1 second sleep
|
|
123
132
|
elif count % 50 == 0:
|
|
124
|
-
sleep_duration =
|
|
133
|
+
sleep_duration = sleep_duration_50 # Divisible by 50 - 30 seconds sleep
|
|
125
134
|
else:
|
|
126
|
-
sleep_duration =
|
|
135
|
+
sleep_duration = stable_sleep_duration
|
|
127
136
|
if out == 1:
|
|
128
137
|
progress_utils.increment_like_task(task2)
|
|
129
138
|
progress_utils.increment_like_task(task)
|
|
130
139
|
time.sleep(sleep_duration)
|
|
140
|
+
title="Liked" if like_action else "Unliked"
|
|
141
|
+
liked=progress_utils.get_like_task(task2).completed
|
|
142
|
+
post=progress_utils.get_like_task(task).completed
|
|
143
|
+
action=title.lower()
|
|
144
|
+
text_out=f"[bold]\\[{username}][/bold] [bold]\\[Action {title}][/bold] ({post} post checked, {liked} post changes to {action})"
|
|
131
145
|
progress_utils.remove_like_task(task)
|
|
132
|
-
|
|
146
|
+
progress_utils.remove_like_task(task2)
|
|
147
|
+
log.warning(text_out)
|
|
148
|
+
return text_out
|
|
133
149
|
|
|
134
150
|
def _toggle_like_requests(c, id, model_id):
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
sleeper=sessionManager.SessionSleep(
|
|
154
|
+
sleep=constants.getattr("SESSION_429_SLEEP_STARTER_VAL"),
|
|
155
|
+
difmin=constants.getattr("SESSION_429_LIKE_INCREASE_SLEEP_TIME_DIF"),
|
|
156
|
+
)
|
|
135
157
|
if not read_args.retriveArgs().force_like and cache.get(f"liked_status_{id}", None):
|
|
136
158
|
log.debug(f"ID: {id} marked as liked in cache")
|
|
137
159
|
return 0
|
|
138
|
-
sleep_duration =
|
|
139
|
-
favorited, id = _like_request(c, id, model_id)
|
|
160
|
+
sleep_duration = constants.getattr("DOUBLE_TOGGLE_SLEEP_DURATION_LIKE")
|
|
161
|
+
favorited, id = _like_request(c, id, model_id,sleeper)
|
|
140
162
|
if favorited:
|
|
141
163
|
log.debug(f"ID: {id} changed to liked")
|
|
142
164
|
out = 1
|
|
143
165
|
else:
|
|
144
166
|
log.debug(f"ID: {id} restored to liked")
|
|
145
167
|
time.sleep(sleep_duration)
|
|
146
|
-
_like_request(c, id, model_id)
|
|
168
|
+
_like_request(c, id, model_id,sleeper)
|
|
147
169
|
out = 2
|
|
148
170
|
cache.set(f"liked_status_{id}", True)
|
|
149
171
|
return out
|
|
150
172
|
|
|
151
173
|
|
|
152
174
|
def _toggle_unlike_requests(c, id, model_id):
|
|
175
|
+
sleeper=sessionManager.SessionSleep(
|
|
176
|
+
sleep=constants.getattr("SESSION_429_SLEEP_STARTER_VAL"),
|
|
177
|
+
difmin=constants.getattr("SESSION_429_LIKE_INCREASE_SLEEP_TIME_DIF")
|
|
178
|
+
)
|
|
153
179
|
if (
|
|
154
180
|
not read_args.retriveArgs().force_like
|
|
155
181
|
and cache.get(f"liked_status_{id}", None) == False
|
|
@@ -157,22 +183,25 @@ def _toggle_unlike_requests(c, id, model_id):
|
|
|
157
183
|
log.debug(f"ID: {id} marked as unliked in cache")
|
|
158
184
|
|
|
159
185
|
return 0
|
|
160
|
-
sleep_duration =
|
|
161
|
-
favorited, id = _like_request(c, id, model_id)
|
|
186
|
+
sleep_duration = constants.getattr("DOUBLE_TOGGLE_SLEEP_DURATION_LIKE")
|
|
187
|
+
favorited, id = _like_request(c, id, model_id,sleeper)
|
|
162
188
|
if not favorited:
|
|
163
189
|
log.debug(f"ID: {id} changed to unliked")
|
|
164
190
|
out = 1
|
|
165
191
|
else:
|
|
166
192
|
log.debug(f"ID: {id} restored to unlike")
|
|
167
193
|
time.sleep(sleep_duration)
|
|
168
|
-
_like_request(c, id, model_id)
|
|
194
|
+
_like_request(c, id, model_id,sleeper)
|
|
169
195
|
out = 2
|
|
170
196
|
cache.set(f"liked_status_{id}", False)
|
|
171
197
|
return out
|
|
172
198
|
|
|
173
199
|
|
|
174
|
-
def _like_request(c, id, model_id):
|
|
200
|
+
def _like_request(c, id, model_id,sleeper):
|
|
201
|
+
|
|
175
202
|
with c.requests(
|
|
176
|
-
constants.getattr("favoriteEP").format(id, model_id),
|
|
203
|
+
constants.getattr("favoriteEP").format(id, model_id),
|
|
204
|
+
method="post",sleeper=sleeper,
|
|
205
|
+
retries=constants.getattr("LIKE_MAX_RETRIES")
|
|
177
206
|
) as r:
|
|
178
207
|
return r.json_()["isFavorite"], r.json_()["id"]
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
import traceback
|
|
3
2
|
|
|
4
3
|
import ofscraper.api.init as init
|
|
5
4
|
import ofscraper.classes.sessionmanager as sessionManager
|
|
@@ -14,11 +13,9 @@ import ofscraper.utils.context.exit as exit
|
|
|
14
13
|
import ofscraper.utils.live.screens as progress_utils
|
|
15
14
|
import ofscraper.utils.profiles.tools as profile_tools
|
|
16
15
|
from ofscraper.commands.helpers.context import (
|
|
17
|
-
get_user_action_execution_function,
|
|
18
16
|
get_user_action_function,
|
|
19
17
|
get_userfirst_action_execution_function,
|
|
20
18
|
get_userfirst_data_function,
|
|
21
|
-
user_first_data_inner_context,
|
|
22
19
|
)
|
|
23
20
|
from ofscraper.commands.helpers.shared import run_action_bool
|
|
24
21
|
from ofscraper.commands.scraper.post import post_media_process
|
|
@@ -33,7 +30,7 @@ log = logging.getLogger("shared")
|
|
|
33
30
|
def runner():
|
|
34
31
|
check_auth()
|
|
35
32
|
with scrape_context_manager():
|
|
36
|
-
with progress_utils.
|
|
33
|
+
with progress_utils.setup_activity_group_live(setup=True,revert=False):
|
|
37
34
|
if read_args.retriveArgs().scrape_paid:
|
|
38
35
|
progress_utils.update_activity_task(
|
|
39
36
|
description="Scraping Entire Paid page"
|
|
@@ -71,94 +68,62 @@ def prepare():
|
|
|
71
68
|
@exit.exit_wrapper
|
|
72
69
|
@run
|
|
73
70
|
async def process_users_actions_normal(userdata=None, session=None):
|
|
74
|
-
user_action_funct = get_user_action_function(process_actions_for_user)
|
|
75
71
|
progress_utils.update_user_activity(description="Users with Actions Completed")
|
|
76
|
-
|
|
77
|
-
for ele in userdata:
|
|
78
|
-
await user_action_funct(user=ele, c=c)
|
|
72
|
+
await get_user_action_function( execute_user_action)(userdata,session)
|
|
79
73
|
|
|
80
74
|
|
|
81
|
-
async def process_actions_for_user(user=None, c=None, *kwargs):
|
|
82
|
-
try:
|
|
83
|
-
all_media, posts, like_posts = await post_media_process(user, c=c)
|
|
84
|
-
await get_user_action_execution_function(execute_user_action)(
|
|
85
|
-
all_media, posts, like_posts, ele=user
|
|
86
|
-
)
|
|
87
|
-
except Exception as e:
|
|
88
|
-
if isinstance(e, KeyboardInterrupt):
|
|
89
|
-
raise e
|
|
90
|
-
log.traceback_(f"failed with exception: {e}")
|
|
91
|
-
log.traceback_(traceback.format_exc())
|
|
92
|
-
|
|
93
75
|
|
|
94
76
|
async def execute_user_action(all_media, posts, like_posts, ele=None):
|
|
95
77
|
actions = read_args.retriveArgs().action
|
|
96
78
|
username = ele.name
|
|
97
79
|
model_id = ele.id
|
|
80
|
+
out=[]
|
|
98
81
|
for action in actions:
|
|
99
82
|
if action == "download":
|
|
100
|
-
await download_action.downloader(
|
|
83
|
+
out.append(await download_action.downloader(
|
|
101
84
|
ele=ele,
|
|
102
85
|
posts=posts,
|
|
103
86
|
media=all_media,
|
|
104
87
|
model_id=model_id,
|
|
105
88
|
username=username,
|
|
106
|
-
)
|
|
89
|
+
))
|
|
107
90
|
elif action == "like":
|
|
108
|
-
like_action.process_like(
|
|
91
|
+
out.append(like_action.process_like(
|
|
109
92
|
ele=ele,
|
|
110
93
|
posts=like_posts,
|
|
111
94
|
media=all_media,
|
|
112
95
|
model_id=model_id,
|
|
113
96
|
username=username,
|
|
114
|
-
)
|
|
97
|
+
))
|
|
115
98
|
elif action == "unlike":
|
|
116
|
-
like_action.process_unlike(
|
|
99
|
+
out.append(like_action.process_unlike(
|
|
117
100
|
ele=ele,
|
|
118
101
|
posts=like_posts,
|
|
119
102
|
media=all_media,
|
|
120
103
|
model_id=model_id,
|
|
121
104
|
username=username,
|
|
122
|
-
)
|
|
105
|
+
))
|
|
106
|
+
return out
|
|
123
107
|
|
|
124
108
|
|
|
125
109
|
@exit.exit_wrapper
|
|
126
110
|
@run
|
|
127
111
|
async def process_users_actions_user_first(userdata, session):
|
|
128
|
-
|
|
129
112
|
data = await get_userfirst_data_function(get_users_data_user_first)(
|
|
130
113
|
userdata, session
|
|
131
114
|
)
|
|
132
|
-
|
|
133
|
-
await get_userfirst_action_execution_function(execute_users_actions_user_first)(
|
|
134
|
-
data
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
async def execute_users_actions_user_first(data):
|
|
139
115
|
progress_utils.update_activity_task(description="Performing Actions on Users")
|
|
140
116
|
progress_utils.update_user_activity(
|
|
141
117
|
description="Users with Actions completed", completed=0
|
|
142
118
|
)
|
|
143
|
-
for _, val in data.items():
|
|
144
|
-
all_media = val["media"]
|
|
145
|
-
posts = val["posts"]
|
|
146
|
-
like_posts = val["like_posts"]
|
|
147
|
-
ele = val["ele"]
|
|
148
|
-
await get_user_action_execution_function(execute_user_action)(
|
|
149
|
-
all_media, posts, like_posts, ele=ele
|
|
150
|
-
)
|
|
151
119
|
|
|
120
|
+
await get_userfirst_action_execution_function(execute_user_action)(
|
|
121
|
+
data
|
|
122
|
+
)
|
|
152
123
|
|
|
153
|
-
async def get_users_data_user_first(session, ele):
|
|
154
|
-
try:
|
|
155
|
-
return await process_ele_user_first_data_retriver(ele, session)
|
|
156
|
-
except Exception as e:
|
|
157
|
-
if isinstance(e, KeyboardInterrupt):
|
|
158
|
-
raise e
|
|
159
|
-
log.traceback_(f"failed with exception: {e}")
|
|
160
|
-
log.traceback_(traceback.format_exc())
|
|
161
124
|
|
|
125
|
+
async def get_users_data_user_first(session, ele):
|
|
126
|
+
return await process_ele_user_first_data_retriver(ele, session)
|
|
162
127
|
|
|
163
128
|
async def process_ele_user_first_data_retriver(ele, session):
|
|
164
129
|
model_id = ele.id
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
STABLE_SLEEP_DURATION_LIKE=5
|
|
2
|
+
SLEEP_DURATION_LIKE_60=1
|
|
3
|
+
SLEEP_DURATION_LIKE_50=30
|
|
4
|
+
COMMON_MULTIPLE_SLEEP_DURATION_LIKE=40
|
|
5
|
+
DOUBLE_TOGGLE_SLEEP_DURATION_LIKE=5
|
|
6
|
+
SESSION_429_LIKE_INCREASE_SLEEP_TIME_DIF=0
|
|
7
|
+
SESSION_429_SLEEP_STARTER_VAL=8
|
|
8
|
+
LIKE_MAX_RETRIES=5
|
|
9
|
+
|
|
10
|
+
|
|
@@ -71,7 +71,7 @@ async def batch_database_changes(new_root, old_root, user_dbs=None):
|
|
|
71
71
|
|
|
72
72
|
except Exception as E:
|
|
73
73
|
failures.append({"path": str(ele), "reason": E})
|
|
74
|
-
log.
|
|
74
|
+
log.warning(f"Issue getting required info for {ele}")
|
|
75
75
|
log.traceback_(E)
|
|
76
76
|
log.traceback_(traceback.format_exc())
|
|
77
77
|
log.info(
|
|
@@ -13,6 +13,7 @@ import ofscraper.utils.settings as settings
|
|
|
13
13
|
import ofscraper.utils.system.system as system
|
|
14
14
|
from ofscraper.download.shared.utils.text import textDownloader
|
|
15
15
|
from ofscraper.utils.context.run_async import run
|
|
16
|
+
from ofscraper.download.shared.utils.log import empty_log
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
@run
|
|
@@ -26,10 +27,11 @@ async def download_process(username, model_id, medialist, posts=None):
|
|
|
26
27
|
|
|
27
28
|
async def download_picker(username, model_id, medialist):
|
|
28
29
|
if len(medialist) == 0:
|
|
30
|
+
out=empty_log(username)
|
|
29
31
|
logging.getLogger("shared").error(
|
|
30
|
-
|
|
32
|
+
out
|
|
31
33
|
)
|
|
32
|
-
return
|
|
34
|
+
return out
|
|
33
35
|
elif (
|
|
34
36
|
system.getcpu_count() > 1
|
|
35
37
|
and (
|
|
@@ -71,7 +73,4 @@ def download_post_process(username, model_id, medialist, postlist):
|
|
|
71
73
|
log.traceback_(traceback.format_exc())
|
|
72
74
|
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
logging.getLogger("shared").error(
|
|
76
|
-
f"[bold]{username}[/bold] ({0} photos, {0} videos, {0} audios, {0} skipped, {0} failed)"
|
|
77
|
-
)
|
|
76
|
+
|
|
@@ -36,7 +36,7 @@ from ofscraper.download.shared.common.general import (
|
|
|
36
36
|
get_medialog,
|
|
37
37
|
subProcessVariableInit,
|
|
38
38
|
)
|
|
39
|
-
from ofscraper.download.shared.utils.log import final_log, log_download_progress
|
|
39
|
+
from ofscraper.download.shared.utils.log import final_log, final_log_text ,log_download_progress
|
|
40
40
|
from ofscraper.download.shared.utils.metadata import metadata
|
|
41
41
|
from ofscraper.download.shared.utils.paths import addGlobalDir, setDirectoriesDate
|
|
42
42
|
from ofscraper.download.shared.utils.progress import convert_num_bytes
|
|
@@ -51,7 +51,7 @@ def process_dicts(username, model_id, filtered_medialist):
|
|
|
51
51
|
common_globals.log = log
|
|
52
52
|
live = (
|
|
53
53
|
partial(progress_utils.setup_download_progress_live, multi=True)
|
|
54
|
-
if not
|
|
54
|
+
if not metadata_md
|
|
55
55
|
else partial(progress_utils.setup_metadata_progress_live)
|
|
56
56
|
)
|
|
57
57
|
try:
|
|
@@ -199,13 +199,7 @@ def process_dicts(username, model_id, filtered_medialist):
|
|
|
199
199
|
with exit.DelayedKeyboardInterrupt():
|
|
200
200
|
raise E
|
|
201
201
|
final_log(username)
|
|
202
|
-
return (
|
|
203
|
-
common_globals.photo_count,
|
|
204
|
-
common_globals.video_count,
|
|
205
|
-
common_globals.audio_count,
|
|
206
|
-
common_globals.forced_skipped,
|
|
207
|
-
common_globals.skipped,
|
|
208
|
-
)
|
|
202
|
+
return final_log_text(username)
|
|
209
203
|
|
|
210
204
|
|
|
211
205
|
def queue_process(pipe_, task1, total):
|