Closed imakiro closed 1 year ago
Also, note : this was tested on PopOS 22.04, with microsoft edge as the browser installed with the official deb package.
Command used :
/bin/python3 ./bing-rewards/bing_rewards/__init__.py -l 5 -s 5 --exe /usr/bin/microsoft-edge
Desktop and mobile were both functional.
Ok cool, I won't be able to take a look at this until next week, but thank you for the contribution. Note that you can add more commits to a PR by just pushing to your PR branch, and it will automatically update here on GitHub. Speaking of which, could you rebase your commits off of the Develop branch HEAD, as it will include the correct upcoming version number
Hi, so I have been reviewing the code. The copy/paste idea is interesting. On the one hand, I like that it will complete the operation with one keypress, instead of pressing multiple keys. That can be an issue if the window ever loses focus, or if the user tries to quit half way through. Also great that the pyperclip dependency is already required by PyAutoGUI (which is already too big IMO, but I don't have time to find an alternative rn).
On the other hand, I don't like the idea of clogging the system clipboard, especially on Windows where I uses the WIN+V clipboard manager regularly. And, that 1 second pause is absolutely prohibitive . That will make the process take way to long.
Interesting about the keyboard issue you ran into. I have also done some testing on Linux (Pop OS 22.04 LTS and Arch Linux) and I don't have the issue with Edge or Brave (much better Chromium-based alternative to Microsoft junk, btw). I have also never heard others report of that issue on Linux systems. Do you have an unusual keyboard layout or other macro settings?
I have run your copy/paste method on my linux machine without the 1 second delay and didn't notice any issues. Any idea why it takes so long for you?
I would be open to the idea once I do some testing on Windows as well
Thank you for the keyboard layout suggestion. I'm indeed on azerty, not qwerty layout, and the special characters issues might come from that, I have to look into it.
For the general speed of the system, it boils down to the kind of setup I target : a setup and forget system, with a really low tier VM that takes a while to do stuff so that my main working machine is not affected. For example, loading edge takes 20 something seconds. So taking time to make sure that every action is registered did not seem like a big issue at first.
Hmmm there's still work to do then. Also, when I have the time, I think I'll try to create a systemd service file so the script can start on it's own.
If you are looking for a completely headless approach, I have seen some other tools around that use selenium. This one requires a desktop environment and grabs control of the keyboard while executing.
I am working on a major version update that will replace the heavy pyautogui
dependency with pynput
, which will reduce the total dependency tree significantly. PyAutoGUI does a whole lot more than is necessary for this project. I am also going to be adding some keyboard interrupt and exit features, and migrating to the poetry
dependency manager and build system for python packages.
For your additions, can we just include the flags for search and load delay on the command line, and leave out the search method, since that is going to be reworked soon.
All of these features will probably be included in the 2.0.0 release
Sure thing for the limitation of the feature. I'll create another branch, from your Dev branch, in which I'll add the feature and do the merge request? how does that sound? Or you can just copy paste whatever you like from that crappy branch of mine :)
I don't really mind having a gui on a server, even if it's sometimes slow, I just need to code to properly interact with this fact. Good call on poetry, it's going to make deployments quite a lot easier.
No need to create another PR, you can just make more commits and push here
Incorporated these commits into PR #25. Thanks for the contribution.
Hi, This is a follow up to my previous merge request. Additions :
Fixes :