eses 1.0.5__tar.gz → 1.0.6__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.
- {eses-1.0.5 → eses-1.0.6}/PKG-INFO +1 -1
- {eses-1.0.5 → eses-1.0.6}/eses/__init__.py +30 -10
- eses-1.0.6/eses/version.py +1 -0
- {eses-1.0.5 → eses-1.0.6}/eses.egg-info/PKG-INFO +1 -1
- {eses-1.0.5 → eses-1.0.6}/pyproject.toml +1 -1
- eses-1.0.5/eses/version.py +0 -1
- {eses-1.0.5 → eses-1.0.6}/LICENSE +0 -0
- {eses-1.0.5 → eses-1.0.6}/README.md +0 -0
- {eses-1.0.5 → eses-1.0.6}/eses.egg-info/SOURCES.txt +0 -0
- {eses-1.0.5 → eses-1.0.6}/eses.egg-info/dependency_links.txt +0 -0
- {eses-1.0.5 → eses-1.0.6}/eses.egg-info/requires.txt +0 -0
- {eses-1.0.5 → eses-1.0.6}/eses.egg-info/top_level.txt +0 -0
- {eses-1.0.5 → eses-1.0.6}/setup.cfg +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
import requests
|
2
2
|
import time
|
3
3
|
import threading
|
4
|
+
from concurrent.futures import ThreadPoolExecutor
|
4
5
|
from datetime import datetime
|
5
6
|
from typing import List, Optional, Dict, Any
|
6
7
|
|
@@ -86,13 +87,15 @@ def donatewithproxy(
|
|
86
87
|
country: str,
|
87
88
|
war_id: str,
|
88
89
|
times: int = 1,
|
89
|
-
delay: int = 0
|
90
|
+
delay: int = 0,
|
91
|
+
max_workers: int = 10
|
90
92
|
) -> None:
|
91
93
|
"""
|
92
|
-
Start automated donations with proxy rotation
|
94
|
+
Start automated concurrent donations with proxy rotation
|
93
95
|
Args:
|
94
96
|
times: Requests per proxy per cycle
|
95
97
|
delay: Seconds between full cycles
|
98
|
+
max_workers: Max concurrent requests (default: 10)
|
96
99
|
"""
|
97
100
|
def _worker():
|
98
101
|
cycle = 0
|
@@ -100,15 +103,32 @@ def donatewithproxy(
|
|
100
103
|
cycle += 1
|
101
104
|
_print_debug(f"=== START CYCLE {cycle} ===")
|
102
105
|
|
103
|
-
# Get
|
106
|
+
# Get proxies (thread-safe)
|
104
107
|
with proxy_lock:
|
105
|
-
current_proxies = proxies.copy() or [None]
|
108
|
+
current_proxies = proxies.copy() or [None]
|
106
109
|
|
107
|
-
# Process
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
110
|
+
# Process all proxies concurrently
|
111
|
+
with ThreadPoolExecutor(max_workers=max_workers) as executor:
|
112
|
+
# Schedule all requests
|
113
|
+
futures = []
|
114
|
+
for proxy in current_proxies:
|
115
|
+
for _ in range(times):
|
116
|
+
futures.append(
|
117
|
+
executor.submit(
|
118
|
+
donate,
|
119
|
+
company_name,
|
120
|
+
country,
|
121
|
+
war_id,
|
122
|
+
proxy=proxy
|
123
|
+
)
|
124
|
+
)
|
125
|
+
|
126
|
+
# Wait for completion
|
127
|
+
for future in futures:
|
128
|
+
try:
|
129
|
+
future.result(timeout=30)
|
130
|
+
except Exception as e:
|
131
|
+
_print_debug(f"Request failed: {str(e)}")
|
112
132
|
|
113
133
|
# Cycle complete
|
114
134
|
_print_debug(f"Cycle {cycle} complete. Waiting {delay}s...")
|
@@ -117,7 +137,7 @@ def donatewithproxy(
|
|
117
137
|
thread = threading.Thread(target=_worker, daemon=True)
|
118
138
|
thread.start()
|
119
139
|
active_threads.append(thread)
|
120
|
-
_print_debug(f"Started donation
|
140
|
+
_print_debug(f"Started donation controller (ID: {thread.ident})")
|
121
141
|
|
122
142
|
def stop_all_donations() -> None:
|
123
143
|
"""Gracefully stop all active donation threads"""
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "1.0.6"
|
eses-1.0.5/eses/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "1.0.5
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|