This is a simple scanner for the Upwork portal.
These instructions will guide you on how to set up and run the project on your local machine.
To run this project, you will need the following tools:
Go to the project root directory and build the docker image:
make dockerize
Start the Selenium server for local testing using docker compose
:
make start-selenium-server
Run the docker image:
docker run -it --rm --network upwork-scanner-network \
-v "$PWD":/scan \
-e USER=<user> \
-e PASS=<pass> \
-e SECRET_ANSWER=<secret_answer> \
-e SELENIUM_SERVER_URL='http://selenium-server:4444' \
upwork-scanner
You should see an ouput similar to this:
2023-07-28 14:19:03 INFO: starting scan
2023-07-28 14:19:03 INFO: logging in to the portal
2023-07-28 14:19:14 INFO: extracting job matches
2023-07-28 14:19:34 INFO: extracting user data
2023-07-28 14:19:40 INFO: extracting address data
When successful, the scanner will create a scan.json
file in the current directory.
Go to the project root directory and create a virtualenv if it's not created:
make venv
source venv/bin/activate
Start the Selenium server:
make start-selenium-server
Run the upwork
module:
python -m upwork \
--user <user> \
--password <pass> \
--secret-answer <answer> \
--selenium-server-url <url> \
--out-file "scan.json"
You should see an ouput similar to this:
2023-07-28 14:19:03 INFO: starting scan
2023-07-28 14:19:03 INFO: logging in to the portal
2023-07-28 14:19:14 INFO: extracting job matches
2023-07-28 14:19:34 INFO: extracting user data
2023-07-28 14:19:40 INFO: extracting address data
When successful, the scanner will create a scan.json
file in the current directory.
This project uses the selenium/standalone-chrome
image with Docker Compose to help with the tests. Use the make test
command to
run them.
This project uses pylint and mypy
to check the source code. Use the make lint
command to run them.