pydoll-python 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. pydoll_python-1.2.0/LICENSE +9 -0
  2. pydoll_python-1.2.0/PKG-INFO +200 -0
  3. pydoll_python-1.2.0/README.md +181 -0
  4. pydoll_python-1.2.0/pydoll/__init__.py +0 -0
  5. pydoll_python-1.2.0/pydoll/browser/__init__.py +0 -0
  6. pydoll_python-1.2.0/pydoll/browser/base.py +524 -0
  7. pydoll_python-1.2.0/pydoll/browser/chrome.py +31 -0
  8. pydoll_python-1.2.0/pydoll/browser/managers.py +154 -0
  9. pydoll_python-1.2.0/pydoll/browser/options.py +62 -0
  10. pydoll_python-1.2.0/pydoll/browser/page.py +433 -0
  11. pydoll_python-1.2.0/pydoll/commands/__init__.py +18 -0
  12. pydoll_python-1.2.0/pydoll/commands/browser.py +108 -0
  13. pydoll_python-1.2.0/pydoll/commands/dom.py +212 -0
  14. pydoll_python-1.2.0/pydoll/commands/fetch.py +308 -0
  15. pydoll_python-1.2.0/pydoll/commands/input.py +106 -0
  16. pydoll_python-1.2.0/pydoll/commands/network.py +334 -0
  17. pydoll_python-1.2.0/pydoll/commands/page.py +187 -0
  18. pydoll_python-1.2.0/pydoll/commands/runtime.py +45 -0
  19. pydoll_python-1.2.0/pydoll/commands/storage.py +18 -0
  20. pydoll_python-1.2.0/pydoll/commands/target.py +35 -0
  21. pydoll_python-1.2.0/pydoll/connection/__init__.py +0 -0
  22. pydoll_python-1.2.0/pydoll/connection/connection.py +232 -0
  23. pydoll_python-1.2.0/pydoll/connection/managers.py +136 -0
  24. pydoll_python-1.2.0/pydoll/constants.py +125 -0
  25. pydoll_python-1.2.0/pydoll/element.py +313 -0
  26. pydoll_python-1.2.0/pydoll/events/__init__.py +13 -0
  27. pydoll_python-1.2.0/pydoll/events/browser.py +26 -0
  28. pydoll_python-1.2.0/pydoll/events/dom.py +108 -0
  29. pydoll_python-1.2.0/pydoll/events/fetch.py +29 -0
  30. pydoll_python-1.2.0/pydoll/events/network.py +160 -0
  31. pydoll_python-1.2.0/pydoll/events/page.py +144 -0
  32. pydoll_python-1.2.0/pydoll/exceptions.py +82 -0
  33. pydoll_python-1.2.0/pydoll/mixins/__init__.py +0 -0
  34. pydoll_python-1.2.0/pydoll/mixins/find_elements.py +180 -0
  35. pydoll_python-1.2.0/pydoll/utils.py +50 -0
  36. pydoll_python-1.2.0/pyproject.toml +52 -0
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2025 <copyright holders>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.1
2
+ Name: pydoll-python
3
+ Version: 1.2.0
4
+ Summary:
5
+ Author: Thalison Fernandes
6
+ Author-email: thalissfernandes99@gmail.com
7
+ Requires-Python: >=3.10,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Requires-Dist: aiofiles (>=23.2.1,<24.0.0)
13
+ Requires-Dist: aiohttp (>=3.9.5,<4.0.0)
14
+ Requires-Dist: bs4 (>=0.0.2,<0.0.3)
15
+ Requires-Dist: requests (>=2.31.0,<3.0.0)
16
+ Requires-Dist: websockets (>=13.1,<14.0)
17
+ Description-Content-Type: text/markdown
18
+
19
+
20
+ <p align="center">
21
+ <h1>🚀 Pydoll: Async Web Automation in Python!</h1>
22
+ </p>
23
+ <br>
24
+ <p align="center">
25
+ <img src="https://github.com/user-attachments/assets/c4615101-d932-4e79-8a08-f50fbc686e3b" alt="Alt text" />
26
+ </p>
27
+
28
+ <p align="center">
29
+ <img src="https://codecov.io/github/thalissonvs/pydoll/graph/badge.svg?token=40I938OGM9"/>
30
+ <img src="https://github.com/thalissonvs/pydoll/actions/workflows/tests.yml/badge.svg" alt="Tests">
31
+ <img src="https://github.com/thalissonvs/pydoll/actions/workflows/ruff-ci.yml/badge.svg" alt="Ruff CI">
32
+ <img src="https://github.com/thalissonvs/pydoll/actions/workflows/release.yml/badge.svg" alt="Release">
33
+ <img src="https://tokei.rs/b1/github/thalissonvs/pydoll" alt="Total lines">
34
+ <img src="https://tokei.rs/b1/github/thalissonvs/pydoll?category=files" alt="Files">
35
+ <img src="https://tokei.rs/b1/github/thalissonvs/pydoll?category=comments" alt="Comments">
36
+ <img src="https://img.shields.io/github/issues/thalissonvs/pydoll?label=Issues" alt="GitHub issues">
37
+ <img src="https://img.shields.io/github/issues-closed/thalissonvs/pydoll?label=Closed issues" alt="GitHub closed issues">
38
+ <img src="https://img.shields.io/github/issues/thalissonvs/pydoll/bug?label=Bugs&color=red" alt="GitHub bug issues">
39
+ <img src="https://img.shields.io/github/issues/thalissonvs/pydoll/enhancement?label=Enhancements&color=purple" alt="GitHub enhancement issues">
40
+ </p>
41
+
42
+
43
+ Pydoll is an innovative Python library that's redefining Chromium browser automation! Unlike other solutions, Pydoll **completely eliminates the need for webdrivers**, providing a much more fluid and reliable automation experience.
44
+
45
+ ## ⭐ Extraordinary Features
46
+
47
+ - **Zero Webdrivers!** Say goodbye to webdriver compatibility and configuration headaches
48
+ - **Native Captcha Bypass!** Naturally passes through Cloudflare Turnstile and reCAPTCHA v3
49
+ - **Performance** thanks to native asynchronous programming
50
+ - **Realistic Interactions** that simulate human behavior
51
+ - **Advanced Event System** for complex and reactive automations
52
+
53
+ ## Table of Contents
54
+
55
+ - [Installation](#-installation)
56
+ - [Quick Start](#-quick-start)
57
+ - [Core Components](#-core-components)
58
+ - [Browser Interface](#browser-interface)
59
+ - [Page Interface](#page-interface)
60
+ - [WebElement Interface](#webelement-interface)
61
+ - [Advanced Features](#-advanced-features)
62
+ - [Event System](#event-system)
63
+ - [Concurrent Scraping](#concurrent-scraping)
64
+ - [Proxy Configuration](#proxy-configuration)
65
+
66
+ ## 🔥 Installation
67
+
68
+ ```bash
69
+ pip install git+https://github.com/thalissonvs/pydoll.git
70
+ ```
71
+
72
+ ## ⚡ Quick Start
73
+
74
+ See how simple it is to get started - no webdriver configuration needed!
75
+
76
+ ```python
77
+ import asyncio
78
+ from pydoll.browser.chrome import Chrome
79
+ from pydoll.constants import By
80
+
81
+ async def main():
82
+ # Start the browser with no additional webdriver configuration!
83
+ async with Chrome() as browser:
84
+ await browser.start()
85
+ page = await browser.get_page()
86
+
87
+ # Navigate through captcha-protected sites without worry
88
+ await page.go_to('https://example-with-cloudflare.com')
89
+ button = await page.find_element(By.CSS_SELECTOR, 'button')
90
+ await button.click()
91
+
92
+ asyncio.run(main())
93
+ ```
94
+
95
+ ## 🎯 Core Components
96
+
97
+ ### Browser Interface
98
+
99
+ Powerful interface for global browser control:
100
+
101
+ ```python
102
+ async def browser_examples():
103
+ async with Chrome() as browser:
104
+ await browser.start()
105
+ # Control multiple pages with incredible ease
106
+ pages = [await browser.get_page() for _ in range(3)]
107
+
108
+ # Advanced settings with a simple command
109
+ await browser.set_window_maximized()
110
+ ```
111
+
112
+ ### Page Interface
113
+
114
+ Individual page control with surgical precision:
115
+
116
+ ```python
117
+ async def page_examples():
118
+ page = await browser.get_page()
119
+
120
+ # Smooth navigation, even on protected sites
121
+ await page.go_to('https://site-with-recaptcha.com')
122
+
123
+ # Capture perfect screenshots
124
+ await page.get_screenshot('/screenshots/evidence.png')
125
+ ```
126
+
127
+ ### WebElement Interface
128
+
129
+ Interact with elements like a real user:
130
+
131
+ ```python
132
+ async def element_examples():
133
+ # Natural and precise interactions
134
+ input_field = await page.find_element(By.CSS_SELECTOR, 'input')
135
+ await input_field.type_keys('Hello World') # Realistic typing!
136
+
137
+ # Intuitive chained operations
138
+ dropdown = await page.find_element(By.CSS_SELECTOR, 'select')
139
+ await dropdown.select_option('value')
140
+
141
+ # Realistic clicks with offset
142
+ button = await page.find_element(By.CSS_SELECTOR, 'button')
143
+ await button.click(x_offset=5, y_offset=10)
144
+ ```
145
+
146
+ ## 🚀 Advanced Features
147
+
148
+ ### Event System
149
+
150
+ Powerful event system for intelligent automation:
151
+
152
+ ```python
153
+ from pydoll.events.page import PageEvents
154
+
155
+ async def event_example():
156
+ await page.enable_page_events()
157
+ # React to events in real-time!
158
+ await page.on(PageEvents.PAGE_LOADED,
159
+ lambda e: print('Page loaded successfully!'))
160
+ ```
161
+
162
+ ### Concurrent Scraping
163
+
164
+ Scrape multiple pages simultaneously with extraordinary performance:
165
+
166
+ ```python
167
+ async def concurrent_example():
168
+ pages = [await browser.get_page() for _ in range(10)]
169
+ # Parallel scraping with intelligent resource management
170
+ results = await asyncio.gather(
171
+ *(scrape_page(page) for page in pages)
172
+ )
173
+ # Just declare the scrape_page method and see the magic happens!
174
+ ```
175
+
176
+ ### Proxy Configuration
177
+
178
+ Robust proxy support, including authentication:
179
+
180
+ ```python
181
+ async def proxy_example():
182
+ options = Options()
183
+ # Private or public proxies, you choose!
184
+ options.add_argument('--proxy-server=username:password@ip:port')
185
+
186
+ async with Chrome(options=options) as browser:
187
+ await browser.start()
188
+ ```
189
+
190
+
191
+ For exploring all available methods and additional features, check out:
192
+ - Browser interface: [pydoll/browser/base.py](./pydoll/browser/base.py)
193
+ - Page interface: [pydoll/browser/page.py](./pydoll/browser/page.py)
194
+ - WebElement interface: [pydoll/element.py](./pydoll/element.py)
195
+ - Chrome options: [Chromium Command Line Switches](https://peter.sh/experiments/chromium-command-line-switches/)
196
+
197
+ ## 🎉 Start Now!
198
+
199
+ Feel free to use, open issues and contributing!
200
+
@@ -0,0 +1,181 @@
1
+
2
+ <p align="center">
3
+ <h1>🚀 Pydoll: Async Web Automation in Python!</h1>
4
+ </p>
5
+ <br>
6
+ <p align="center">
7
+ <img src="https://github.com/user-attachments/assets/c4615101-d932-4e79-8a08-f50fbc686e3b" alt="Alt text" />
8
+ </p>
9
+
10
+ <p align="center">
11
+ <img src="https://codecov.io/github/thalissonvs/pydoll/graph/badge.svg?token=40I938OGM9"/>
12
+ <img src="https://github.com/thalissonvs/pydoll/actions/workflows/tests.yml/badge.svg" alt="Tests">
13
+ <img src="https://github.com/thalissonvs/pydoll/actions/workflows/ruff-ci.yml/badge.svg" alt="Ruff CI">
14
+ <img src="https://github.com/thalissonvs/pydoll/actions/workflows/release.yml/badge.svg" alt="Release">
15
+ <img src="https://tokei.rs/b1/github/thalissonvs/pydoll" alt="Total lines">
16
+ <img src="https://tokei.rs/b1/github/thalissonvs/pydoll?category=files" alt="Files">
17
+ <img src="https://tokei.rs/b1/github/thalissonvs/pydoll?category=comments" alt="Comments">
18
+ <img src="https://img.shields.io/github/issues/thalissonvs/pydoll?label=Issues" alt="GitHub issues">
19
+ <img src="https://img.shields.io/github/issues-closed/thalissonvs/pydoll?label=Closed issues" alt="GitHub closed issues">
20
+ <img src="https://img.shields.io/github/issues/thalissonvs/pydoll/bug?label=Bugs&color=red" alt="GitHub bug issues">
21
+ <img src="https://img.shields.io/github/issues/thalissonvs/pydoll/enhancement?label=Enhancements&color=purple" alt="GitHub enhancement issues">
22
+ </p>
23
+
24
+
25
+ Pydoll is an innovative Python library that's redefining Chromium browser automation! Unlike other solutions, Pydoll **completely eliminates the need for webdrivers**, providing a much more fluid and reliable automation experience.
26
+
27
+ ## ⭐ Extraordinary Features
28
+
29
+ - **Zero Webdrivers!** Say goodbye to webdriver compatibility and configuration headaches
30
+ - **Native Captcha Bypass!** Naturally passes through Cloudflare Turnstile and reCAPTCHA v3
31
+ - **Performance** thanks to native asynchronous programming
32
+ - **Realistic Interactions** that simulate human behavior
33
+ - **Advanced Event System** for complex and reactive automations
34
+
35
+ ## Table of Contents
36
+
37
+ - [Installation](#-installation)
38
+ - [Quick Start](#-quick-start)
39
+ - [Core Components](#-core-components)
40
+ - [Browser Interface](#browser-interface)
41
+ - [Page Interface](#page-interface)
42
+ - [WebElement Interface](#webelement-interface)
43
+ - [Advanced Features](#-advanced-features)
44
+ - [Event System](#event-system)
45
+ - [Concurrent Scraping](#concurrent-scraping)
46
+ - [Proxy Configuration](#proxy-configuration)
47
+
48
+ ## 🔥 Installation
49
+
50
+ ```bash
51
+ pip install git+https://github.com/thalissonvs/pydoll.git
52
+ ```
53
+
54
+ ## ⚡ Quick Start
55
+
56
+ See how simple it is to get started - no webdriver configuration needed!
57
+
58
+ ```python
59
+ import asyncio
60
+ from pydoll.browser.chrome import Chrome
61
+ from pydoll.constants import By
62
+
63
+ async def main():
64
+ # Start the browser with no additional webdriver configuration!
65
+ async with Chrome() as browser:
66
+ await browser.start()
67
+ page = await browser.get_page()
68
+
69
+ # Navigate through captcha-protected sites without worry
70
+ await page.go_to('https://example-with-cloudflare.com')
71
+ button = await page.find_element(By.CSS_SELECTOR, 'button')
72
+ await button.click()
73
+
74
+ asyncio.run(main())
75
+ ```
76
+
77
+ ## 🎯 Core Components
78
+
79
+ ### Browser Interface
80
+
81
+ Powerful interface for global browser control:
82
+
83
+ ```python
84
+ async def browser_examples():
85
+ async with Chrome() as browser:
86
+ await browser.start()
87
+ # Control multiple pages with incredible ease
88
+ pages = [await browser.get_page() for _ in range(3)]
89
+
90
+ # Advanced settings with a simple command
91
+ await browser.set_window_maximized()
92
+ ```
93
+
94
+ ### Page Interface
95
+
96
+ Individual page control with surgical precision:
97
+
98
+ ```python
99
+ async def page_examples():
100
+ page = await browser.get_page()
101
+
102
+ # Smooth navigation, even on protected sites
103
+ await page.go_to('https://site-with-recaptcha.com')
104
+
105
+ # Capture perfect screenshots
106
+ await page.get_screenshot('/screenshots/evidence.png')
107
+ ```
108
+
109
+ ### WebElement Interface
110
+
111
+ Interact with elements like a real user:
112
+
113
+ ```python
114
+ async def element_examples():
115
+ # Natural and precise interactions
116
+ input_field = await page.find_element(By.CSS_SELECTOR, 'input')
117
+ await input_field.type_keys('Hello World') # Realistic typing!
118
+
119
+ # Intuitive chained operations
120
+ dropdown = await page.find_element(By.CSS_SELECTOR, 'select')
121
+ await dropdown.select_option('value')
122
+
123
+ # Realistic clicks with offset
124
+ button = await page.find_element(By.CSS_SELECTOR, 'button')
125
+ await button.click(x_offset=5, y_offset=10)
126
+ ```
127
+
128
+ ## 🚀 Advanced Features
129
+
130
+ ### Event System
131
+
132
+ Powerful event system for intelligent automation:
133
+
134
+ ```python
135
+ from pydoll.events.page import PageEvents
136
+
137
+ async def event_example():
138
+ await page.enable_page_events()
139
+ # React to events in real-time!
140
+ await page.on(PageEvents.PAGE_LOADED,
141
+ lambda e: print('Page loaded successfully!'))
142
+ ```
143
+
144
+ ### Concurrent Scraping
145
+
146
+ Scrape multiple pages simultaneously with extraordinary performance:
147
+
148
+ ```python
149
+ async def concurrent_example():
150
+ pages = [await browser.get_page() for _ in range(10)]
151
+ # Parallel scraping with intelligent resource management
152
+ results = await asyncio.gather(
153
+ *(scrape_page(page) for page in pages)
154
+ )
155
+ # Just declare the scrape_page method and see the magic happens!
156
+ ```
157
+
158
+ ### Proxy Configuration
159
+
160
+ Robust proxy support, including authentication:
161
+
162
+ ```python
163
+ async def proxy_example():
164
+ options = Options()
165
+ # Private or public proxies, you choose!
166
+ options.add_argument('--proxy-server=username:password@ip:port')
167
+
168
+ async with Chrome(options=options) as browser:
169
+ await browser.start()
170
+ ```
171
+
172
+
173
+ For exploring all available methods and additional features, check out:
174
+ - Browser interface: [pydoll/browser/base.py](./pydoll/browser/base.py)
175
+ - Page interface: [pydoll/browser/page.py](./pydoll/browser/page.py)
176
+ - WebElement interface: [pydoll/element.py](./pydoll/element.py)
177
+ - Chrome options: [Chromium Command Line Switches](https://peter.sh/experiments/chromium-command-line-switches/)
178
+
179
+ ## 🎉 Start Now!
180
+
181
+ Feel free to use, open issues and contributing!
File without changes
File without changes