{"id":23428419,"url":"https://github.com/xredax/liteium","last_synced_at":"2025-07-06T22:07:02.027Z","repository":{"id":242587284,"uuid":"809546911","full_name":"XredaX/liteium","owner":"XredaX","description":"Liteium is a lightweight Python library inspired by Selenium, designed to simplify web scraping and automation tasks","archived":false,"fork":false,"pushed_at":"2024-07-07T00:04:21.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T16:54:28.078Z","etag":null,"topics":["automation","library","python","scraping","selenium"],"latest_commit_sha":null,"homepage":"https://liteium-doc.vercel.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XredaX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-03T01:24:08.000Z","updated_at":"2025-03-24T00:21:04.000Z","dependencies_parsed_at":"2024-07-07T01:25:27.591Z","dependency_job_id":"cdf1cb48-ea1b-463d-b415-a7ef7b26a48a","html_url":"https://github.com/XredaX/liteium","commit_stats":null,"previous_names":["xredax/liteium"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XredaX/liteium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XredaX%2Fliteium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XredaX%2Fliteium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XredaX%2Fliteium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XredaX%2Fliteium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XredaX","download_url":"https://codeload.github.com/XredaX/liteium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XredaX%2Fliteium/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259851046,"owners_count":22921618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","library","python","scraping","selenium"],"created_at":"2024-12-23T07:12:28.853Z","updated_at":"2025-07-06T22:07:01.982Z","avatar_url":"https://github.com/XredaX.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![liteium banner](assets/images/banner.png)\n\n# liteium: A Lightweight Web Scraping and Automation Library\n\n**liteium** is a user-friendly Python library inspired by Selenium, designed to simplify web scraping and automation tasks, especially for beginners. \n\nIt offers a streamlined interface with intuitive methods, making it easier to interact with web pages and extract data without the need for extensive Selenium knowledge.\n\n## Features ✨\n\n* **Simplified Syntax:**  Focus on clarity and ease of use, allowing you to write concise and readable code. \n* **Lightweight:**  Minimal dependencies, making it a lightweight solution without sacrificing functionality.\n* **Common Web Interactions:**  Includes methods for finding elements, interacting with forms, taking screenshots, managing cookies, and more.\n* **Exception Handling:**  Provides helpful error messages to guide you through potential issues.\n\n## Installation 🚀\n\nInstall liteium using pip:\n\n```bash\npip install liteium\n```\n\n## Quick Start 🚗\n\nHere's a basic example of using liteium:\n\n```python\nfrom liteium import *\n\n# Initialize the WebDriver (replace with your chromedriver path)\ndriver_path = '/path/to/chromedriver'\ninit_driver(driver_path)\n\n# Open a URL\nopen_url('https://www.example.com')\n\n# Find an element by ID\nelement = id('exampleId')\nprint(element.text)\n\n# Take a screenshot\nscreenshot('example.png')\n\n# Close the WebDriver\nclose() \n```\n\n## Key Methods 🗝️\n\n* **`init_driver(driver_path, browser='chrome')`**: Initialize the WebDriver (Chrome or Firefox).\n* **`open_url(url)`**: Open a specified URL in the browser.\n* **`find_element(by, value, time=10)`**:  Find a single element by various locators (ID, name, XPath, etc.).\n* **`find_elements(by, value, time=10)`**: Find multiple elements using the same locator approach.\n* **`screenshot(filename=None)`**: Capture a screenshot of the current page.\n* **`save_cookies(filename=None)`**: Save the browser's cookies to a file.\n* **`delete_cookies()`**: Delete all cookies in the browser.\n* **`set_cookies(filename)`**: Load cookies from a file and set them in the browser.\n* **`switch_to_alert(action='accept')`**: Interact with browser alerts (accept, cancel, get text).\n* **`switch_to_default()`**: Switch back to the main document from a frame or window.\n* **`switch_to_frame(frame)`**: Switch to a specific frame within the current page.\n* **`switch_to_window(index_or_name)`**: Switch to a particular window (by index or name).\n* **`new_window(url='about:blank')`**: Open a new browser window.\n* **`js(script)`**: Execute JavaScript code in the browser.\n* **`refresh()`**: Refresh the current page.\n* **`forward()`**: Navigate forward in the browser's history.\n* **`back()`**: Navigate backward in the browser's history.\n* **`get_current_url()`**: Get the current URL of the browser.\n* **`get_title()`**: Get the title of the current page.\n\n##  Documentation 📚\n\nFor a detailed explanation of all available methods and usage examples, please visit the [liteium documentation](https://liteium-doc.vercel.app/).\n\n## Contributing 🤝\n\nContributions are always welcome! If you have any ideas, feature requests, or bug fixes, please open an issue or submit a pull request on GitHub: [https://github.com/XredaX/liteium](https://github.com/XredaX/liteium).\n\n## Support 📧\n\nIf you have any questions or need assistance, feel free to contact me:\n\n* Email: redaelbettioui@gmail.com\n* LinkedIn: [https://www.linkedin.com/in/reda-el-bettioui/](https://www.linkedin.com/in/reda-el-bettioui/)\n\n## License 📝\n\nliteium is released under the MIT License. See the LICENSE file for details.\n\n## Star the Repository ⭐\n\nIf you find this library helpful, please consider giving it a star on GitHub ⭐ to show your support!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxredax%2Fliteium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxredax%2Fliteium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxredax%2Fliteium/lists"}