Open bulk Tab using domain list on chrome tab.
#Ruturaj Script for RTool ROpen
-
parser.add_argument('-f', '--file', type=str, required=True, help='Path to file containing list of websites'):- This line makes the file path argument required. The user must provide the path to
websites.txt.
- This line makes the file path argument required. The user must provide the path to
-
Handling Browser Path for Chrome:
- The script uses a hard-coded path to the Chrome executable. Adjust this path if Chrome is installed in a different location on your system.
###installation
Install Vie Git
git clone https://github.com/RuturajS/ROpen.git & cd Ropen
mkdir +7 search.py
pip install -r requirements.txt
python3 search.py -h-
Save the Python Script:
- Save the above Python script as
search.py.
- Save the above Python script as
-
Run the Script with Different Options:
- Specify the path to
websites.txtand open the first 10 domains:python search.py -f "path/to/websites.txt" -s "YOUR_SEARCH_QUERY" -o 10
- Open all domains:
python search.py -f "path/to/websites.txt" -s "YOUR_SEARCH_QUERY" -o all
- Open only
http://domains:python search.py -f "path/to/websites.txt" -s "YOUR_SEARCH_QUERY" -p http
- Open only
https://domains:python search.py -f "path/to/websites.txt" -s "YOUR_SEARCH_QUERY" -p https
- Open only IP addresses:
python search.py -f "path/to/websites.txt" -s "YOUR_SEARCH_QUERY" -ip
- Open in Chrome:
python search.py -f "path/to/websites.txt" -s "YOUR_SEARCH_QUERY" -b chrome
- Specify the path to
You can view the help text for all available commands and options by running:
python search.py -hThis will display:
usage: search.py [-h] -f FILE [-o OPEN] -s SEARCH [-p {http,https}] [-ip] [-b {default,chrome}]
Open websites with search query in browser tabs.
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE Path to file containing list of websites
-o OPEN, --open OPEN Number of websites to open or "all"
-s SEARCH, --search SEARCH
Search query text (required)
-p {http,https}, --protocol {http,https}
Filter by protocol (http or https)
-ip, --ip Filter by IP addresses only
-b {default,chrome}, --browser {default,chrome}
Browser to use (default or chrome)
- Ensure the path to
websites.txtis correct when you run the script. - Replace
"YOUR_SEARCH_QUERY"with the actual search text you want to use. - Adjust the Chrome executable path if needed.
- This script assumes that the
webbrowsermodule can open Chrome directly. If it doesn't work, you might need to configure thewebbrowsermodule to locate the Chrome executable on your system.