A scraper for Dofus Auction house
Warning
Because this project is not following the CGU of the game, I stopped the development. The project is basically empty at the moment.
Description •
Install •
Usage •
Contribute
Documentation
dofas stands for Dofus Auction house Scraper.
You can install it locally by first cloning the repository :
git clone https://github.com/astariul/dofas.git
cd dofas
pip install -e .
First of all, you need to extract some template that matches your screen. Take a screenshot of your game, while the Auction House is opened. Save that screenshot somewhere and run :
dofas template --screenshot screenshot_hdv.png --template hdv_template.png --hdv_name "Hôtel de Vente"
Here, we use the screenshot located at screenshot_hdv.png. This command will run the OCR on the full screen, and extract a template (saved in hdv_template.png) of the name Hôtel de Vente (Auction House in French).
Note
We need this template for fast template matching. When the script is running and taking screenshots in real-time, we can't run the OCR on the full screen, it takes way too long. So instead, we run it once, extract the template we need, and later we will use this template for fast matching.
You need to run this step only once (to generate the template).
To contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !
Pre-commit hooks are set to check the code added whenever you commit something.
Note
If you never ran the hooks before, install it with :
pip install -e .[hook]
pre-commit installThen you can just try to commit your code. If your code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again !
Tip
You can manually run the pre-commit hooks with :
pre-commit run --all-filesWhen you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !
Note
Install the testing dependencies with :
pip install -e .[test]You can run the tests with :
pytestTests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developpers we want the pre-commit hooks to be fast !
The documentation should be kept up-to-date. You can visualize the documentation locally by running :
mkdocs serveNote
Before running this, you need to install the documentation dependencies :
pip install -e .[docs]