Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomSearch

RandomSearch is a simple tool that helps you do random searches.

Readme index:

HOW IT LOOKS

HOW IT WORKS

RandomSearch currently supports four browsers: Chrome, Firefox, Edge and Opera.
To be able to use it on Opera, the browser must be installed in "C:\Users\username\Program Files\Opera" folder.

In the settings you can change:

  • PC speed - (Very Fast, Fast, Slow, Very Slow), to increase/decrease the time between the various operations;
  • Search language - (English, Italiano), to change the language of the searches;
  • Browser - (Chrome, Edge, Firefox, Opera);
  • Engine - (Bing, DuckDuckGo, Ecosia, Google, Yahoo);
  • Search mode - (PC + Mobile, PC, Mobile), to select the type of the searches;
  • PC searches and Mobile searches, to change the number of the searches.

In order for the tool to work correctly, while it is running you must not remove the focus from the browser.
Before starting the "mobile" searches for the first time, it is necessary to open the browser's dev tools (F12) and enable the mobile device emulation (Ctrl+Shift+M). The browser will remember it and the tool will be able to independently set it again.

BUILD FROM SOURCES

To build RandomSearch yourself on Windows you need to install Python (pip is automatically installed with it) selecting "Add Python to PATH" and disabling path length limit (see images below).

To verify that the installation was successful you can run the following commands into the Windows Command Prompt:

python --version
pip --version

If the python one doesn't work, try with:

py --version

If you see a version of Python less than 3.10.0 then is recommended to upgrade your installation.
Now you need to install through pip two libraries needed for the project to work: keyboard and pillow.

pip install keyboard pillow

Download and extract on the Desktop the sources. You can now proceed in two ways:

  1. via terminal, installing PyInstaller.
  2. with a GUI, installing Auto PY to EXE;

1. PyInstaller

PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules.

pip install pyinstaller

Run the following two commands into the Windows Command Prompt (modifying the "username"):

cd Desktop
pyinstaller --noconfirm --onedir --windowed --icon "C:/Users/username/Desktop/random-search-main/res/rsi.ico" --add-data "C:/Users/username/Desktop/random-search-main/utils.py;." --add-data "C:/Users/username/Desktop/random-search-main/config.json;." --add-data "C:/Users/username/Desktop/random-search-main/res;res/"  "C:/Users/username/Desktop/random-search-main/RandomSearch.py"

You should now see on the Desktop two folders and a file: dist, build and RandomSearch.spec. You can delete build and RandomSearch.spec and move the RandomSearch folder out of dist.

2. Auto PY to EXE

Auto PY to EXE is a .py to .exe converter using a simple graphical interface and PyInstaller in Python.

pip install auto-py-to-exe

Use the following command to run Auto PY to EXE:

auto-py-to-exe

Configure it as in the image below, adding the res folder and the utils.py and config.json files in "Additional Files".

Then click the "CONVERT .PY TO .EXE" button.
If at the end of the conversion try you get the following error

  File "C:\Users\username\AppData\Local\Programs\Python\Python310\Lib\dis.py", line 338, in _get_instructions_bytes
    argval, argrepr = _get_const_info(arg, constants)
  File "C:\Users\username\AppData\Local\Programs\Python\Python310\Lib\dis.py", line 292, in _get_const_info
    argval = const_list[const_index]
IndexError: tuple index out of range

Project output will not be moved to output folder
Complete.

you have to go to the folder "C:\Users\username\AppData\Local\Programs\Python\Python310\Lib" and edit the file 'dis.py'. In the 'dis.py' file you have to find this def _unpack_opargs and inside the else statement write a new line with extended_arg = 0, then save the file and try again.

else:
    arg = None
    extended_arg = 0 
yield (i, op, arg)

ModuleNotFoundError

If trying to run RandomSearch.exe you got the above error, you need to install the mentioned module through pip (as seen before for keyboard and pillow libraries). Delete the old converted output and start the conversion again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages