
DZ Fulfillment
Pricing
Pay per usage
Go to Apify Store

DZ Fulfillment
Under maintenance0.0 (0)
Pricing
Pay per usage
0
2
1
Last modified
7 months ago

Pricing
Pay per usage

0.0 (0)
Pricing
Pay per usage
0
2
1
Last modified
7 months ago
FROM apify/actor-python-playwright
# Copy the project files into the imageCOPY . .
# Install any additional Python dependenciesRUN pip install -r requirements.txt{    "actorSpecification": 1,    "name": "my-actor-5",    "title": "Getting started with Python and Playwright",    "description": "Scrapes titles of websites using Playwright.",    "version": "0.0",    "buildTag": "latest",    "meta": {        "templateId": "python-playwright"    },    "input": "./input_schema.json",    "dockerfile": "./Dockerfile"}{  "title": "DZ Fulfillment Login",  "type": "object",  "schemaVersion": 1,  "properties": {    "email": {      "title": "Login Email",      "type": "string",      "description": "Email address used to log into DZ Fulfillment.",      "editor": "textfield"    },    "password": {      "title": "Login Password",      "type": "string",      "description": "Password for DZ Fulfillment account.",      "editor": "textfield"    }  },  "required": ["email", "password"]}1from apify import Actor2from playwright.async_api import async_playwright3
4async def main():5    async with Actor:6        async with async_playwright() as p:7            browser = await p.chromium.launch(headless=True)8            context = await browser.new_context()9            page = await context.new_page()10            11            actor_input = await Actor.get_input() or {}            12
13            username = actor_input.get('Login Email')14            password = actor_input.get('Login Password')15
16            # Go to the login page17            await page.goto("https://online.dzfulfillment.com/web/login")18
19            # Fill in email and password20            await page.locator("xpath=/html/body/div[1]/main/div/form/div[1]/input").fill("username")21            await page.locator("xpath=/html/body/div[1]/main/div/form/div[2]/input").fill("password")22
23            # Click the login button24            await page.locator("xpath=/html/body/div[1]/main/div/form/div[3]/button").click()25
26            # Wait for page navigation or a few seconds27            await page.wait_for_timeout(5000)28
29            # Print cookies (look for session)30            cookies = await context.cookies()31            for cookie in cookies:32                if 'session' in cookie['name'].lower():33                    print(f"Session cookie found: {cookie}")34
35            await Actor.push_data({36            'session': session_id        37                })        38
39            await browser.close().git.mise.toml.nvim.luastorage
# The rest is copied from https://github.com/github/gitignore/blob/main/Python.gitignore
# Byte-compiled / optimized / DLL files__pycache__/*.py[cod]*$py.class
# C extensions*.so
# Distribution / packaging.Pythonbuild/develop-eggs/dist/downloads/eggs/.eggs/lib/lib64/parts/sdist/var/wheels/share/python-wheels/*.egg-info/.installed.cfg*.eggMANIFEST
# PyInstaller#  Usually these files are written by a python script from a template#  before PyInstaller builds the exe, so as to inject date/other infos into it.*.manifest*.spec
# Installer logspip-log.txtpip-delete-this-directory.txt
# Unit test / coverage reportshtmlcov/.tox/.nox/.coverage.coverage.*.cachenosetests.xmlcoverage.xml*.cover*.py,cover.hypothesis/.pytest_cache/cover/
# Translations*.mo*.pot
# Django stuff:*.loglocal_settings.pydb.sqlite3db.sqlite3-journal
# Flask stuff:instance/.webassets-cache
# Scrapy stuff:.scrapy
# Sphinx documentationdocs/_build/
# PyBuilder.pybuilder/target/
# Jupyter Notebook.ipynb_checkpoints
# IPythonprofile_default/ipython_config.py
# pyenv#   For a library or package, you might want to ignore these files since the code is#   intended to run in multiple environments; otherwise, check them in:.python-version
# pdm#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.#pdm.lock#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it#   in version control.#   https://pdm.fming.dev/latest/usage/project/#working-with-version-control.pdm.toml.pdm-python.pdm-build/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm__pypackages__/
# Celery stuffcelerybeat-schedulecelerybeat.pid
# SageMath parsed files*.sage.py
# Environments.env.venvenv/venv/ENV/env.bak/venv.bak/
# Spyder project settings.spyderproject.spyproject
# Rope project settings.ropeproject
# mkdocs documentation/site
# mypy.mypy_cache/.dmypy.jsondmypy.json
# Pyre type checker.pyre/
# pytype static type analyzer.pytype/
# Cython debug symbolscython_debug/
# PyCharm#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore#  and can be added to the global gitignore or merged into this file.  For a more nuclear#  option (not recommended) you can uncomment the following to ignore the entire idea folder..idea/.mise.toml.nvim.luastorage
# The rest is copied from https://github.com/github/gitignore/blob/main/Python.gitignore
# Byte-compiled / optimized / DLL files__pycache__/*.py[cod]*$py.class
# C extensions*.so
# Distribution / packaging.Pythonbuild/develop-eggs/dist/downloads/eggs/.eggs/lib/lib64/parts/sdist/var/wheels/share/python-wheels/*.egg-info/.installed.cfg*.eggMANIFEST
# PyInstaller#  Usually these files are written by a python script from a template#  before PyInstaller builds the exe, so as to inject date/other infos into it.*.manifest*.spec
# Installer logspip-log.txtpip-delete-this-directory.txt
# Unit test / coverage reportshtmlcov/.tox/.nox/.coverage.coverage.*.cachenosetests.xmlcoverage.xml*.cover*.py,cover.hypothesis/.pytest_cache/cover/
# Translations*.mo*.pot
# Django stuff:*.loglocal_settings.pydb.sqlite3db.sqlite3-journal
# Flask stuff:instance/.webassets-cache
# Scrapy stuff:.scrapy
# Sphinx documentationdocs/_build/
# PyBuilder.pybuilder/target/
# Jupyter Notebook.ipynb_checkpoints
# IPythonprofile_default/ipython_config.py
# pyenv#   For a library or package, you might want to ignore these files since the code is#   intended to run in multiple environments; otherwise, check them in:.python-version
# pdm#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.#pdm.lock#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it#   in version control.#   https://pdm.fming.dev/latest/usage/project/#working-with-version-control.pdm.toml.pdm-python.pdm-build/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm__pypackages__/
# Celery stuffcelerybeat-schedulecelerybeat.pid
# SageMath parsed files*.sage.py
# Environments.env.venvenv/venv/ENV/env.bak/venv.bak/
# Spyder project settings.spyderproject.spyproject
# Rope project settings.ropeproject
# mkdocs documentation/site
# mypy.mypy_cache/.dmypy.jsondmypy.json
# Pyre type checker.pyre/
# pytype static type analyzer.pytype/
# Cython debug symbolscython_debug/
# PyCharm#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore#  and can be added to the global gitignore or merged into this file.  For a more nuclear#  option (not recommended) you can uncomment the following to ignore the entire idea folder..idea/
# Zed editor#  Ignores the folder created when setting Project Settings in the Zed editor. Can be commented out#  to share Project Settings within a team.zed1