Tool Python sử dụng Selenium để quản lý nhiều profile Google Chrome một cách dễ dàng và hiệu quả.
- ✅ Tạo và quản lý nhiều profile Chrome
- ✅ Mở/đóng profiles độc lập
- ✅ Chuyển đổi giữa các profiles
- ✅ Chạy ở chế độ headless
- ✅ Lưu trữ cấu hình profiles
- ✅ Giao diện menu tương tác
- ✅ Sử dụng ChromeDriver 114.0.5735.90 ổn định
- Python 3.7+
- Google Chrome browser
- Windows/Linux/macOS
- Clone hoặc tải project:
git clone <repository-url>
cd google-profile-manager- Cài đặt dependencies:
pip install -r requirements.txt- Chạy tool:
python main.pyChạy python main.py và chọn chế độ 1 để sử dụng menu tương tác:
🔧 GOOGLE PROFILE MANAGER
==================================================
1. Tạo profile mới
2. Mở profile
3. Đóng profile
4. Đóng tất cả profiles
5. Chuyển đổi profile
6. Xem danh sách profiles
7. Xem thông tin profile
8. Điều hướng đến Google
9. Xóa profile
0. Thoát
==================================================
Chạy python main.py và chọn chế độ 2 để xem demo tự động.
from google_profile_manager import GoogleProfileManager
# Khởi tạo manager
manager = GoogleProfileManager()
# Tạo profile mới
manager.create_profile("my_profile")
# Mở profile
manager.open_profile("my_profile", headless=False)
# Chuyển đổi profile
driver = manager.switch_to_profile("my_profile")
# Thao tác với browser
driver.get("https://www.google.com")
driver.find_element("name", "q").send_keys("Hello World")
# Đóng profile
manager.close_profile("my_profile")manager = GoogleProfileManager(profiles_dir="chrome_profiles")| Phương thức | Mô tả | Tham số | Trả về |
|---|---|---|---|
create_profile(name, user_data_dir) |
Tạo profile mới | name: tên profile, user_data_dir: đường dẫn (tùy chọn) |
bool |
open_profile(name, headless) |
Mở profile | name: tên profile, headless: chế độ headless |
bool |
close_profile(name) |
Đóng profile | name: tên profile |
bool |
close_all_profiles() |
Đóng tất cả profiles | - | bool |
switch_to_profile(name) |
Chuyển đổi profile | name: tên profile |
webdriver.Chrome |
get_active_profiles() |
Lấy danh sách profiles đang mở | - | List[str] |
get_all_profiles() |
Lấy tất cả profiles | - | List[str] |
delete_profile(name) |
Xóa profile | name: tên profile |
bool |
get_profile_info(name) |
Lấy thông tin profile | name: tên profile |
dict |
navigate_to_google(name) |
Điều hướng đến Google | name: tên profile |
bool |
google-profile-manager/
├── google_profile_manager.py # Class chính
├── main.py # File demo và menu
├── requirements.txt # Dependencies
├── README.md # Hướng dẫn
└── chrome_profiles/ # Thư mục chứa profiles
├── profiles_config.json # File cấu hình
├── chromedriver_114/ # ChromeDriver 114
├── profile1/ # Profile 1
├── profile2/ # Profile 2
└── ...
Tool sử dụng ChromeDriver phiên bản 114.0.5735.90 ổn định:
- Tương thích tốt với Chrome mới
- Ít lỗi crash hơn phiên bản mới nhất
- Tự động tải và cài đặt
Bạn có thể chỉnh sửa Chrome options trong file google_profile_manager.py:
chrome_options.add_argument("--disable-extensions")
chrome_options.add_argument("--disable-plugins")
chrome_options.add_argument("--disable-web-security")manager = GoogleProfileManager(profiles_dir="my_custom_profiles")❌ ChromeDriver 114 chưa được thiết lập!
Giải pháp: Tool tự động tải ChromeDriver 114, nếu vẫn lỗi thì kiểm tra kết nối internet.
⚠️ Profile 'my_profile' đã được mở!
Giải pháp: Đóng profile hiện tại trước khi mở lại.
❌ Lỗi khi tạo profile: Permission denied
Giải pháp: Chạy với quyền administrator hoặc chọn thư mục khác.
- Mỗi profile có thư mục riêng biệt
- Dữ liệu profile được lưu trữ cục bộ
- Không gửi dữ liệu lên server
- Tự động đóng profiles khi thoát
- Tool tự động tải ChromeDriver 114.0.5735.90
- Mỗi profile có thể chạy độc lập với nhau
- Hỗ trợ chế độ headless để chạy ngầm
- Sử dụng ChromeDriver ổn định
Mọi đóng góp đều được chào đón! Hãy tạo issue hoặc pull request.
MIT License - Xem file LICENSE để biết thêm chi tiết.
Tool được phát triển để hỗ trợ quản lý nhiều tài khoản Google một cách hiệu quả.
Lưu ý: Tool này chỉ dành cho mục đích học tập và phát triển. Vui lòng tuân thủ các điều khoản sử dụng của Google.