powerdlz23 1.1.6 → 1.1.7

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.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,134 @@
1
+ # TikViews - Zefoy Automation
2
+ > 📢 Announcement | Last Update 24-09-2023 | For Donation User 📢
3
+
4
+ > This script may no longer be supported on the latest version of zefoy website 2023. We have made a new update version in September now with new update everything is working fine . but if you want the latest updates, you can donate to me directly by contacting via [My Telegram](https://t.me/Sandroputraaa)
5
+ >
6
+ > We provide 2 package, Basic and Professional :
7
+ >
8
+ > - Basic will get ( exe ) Windows encrypted software [ Price ( 30$ ) ]
9
+ >
10
+ > - Professional will get Full source code non enc [ Price is ( 100$ ) Free update 2 month ]
11
+ >
12
+ > Donation User List : [Donation User List](https://github.com/sandrocods/Zefoy-Automation/blob/master/donation-userlist.md)
13
+ >
14
+ > Demo Video of New Upadated :
15
+
16
+
17
+
18
+ https://github.com/sandrocods/Zefoy-Automation/assets/59155826/3fccdb62-fab9-4293-beda-631c465c4fa3
19
+
20
+ #### Hearts Enabled Trick
21
+ ![image](https://github.com/sandrocods/Zefoy-Automation/assets/59155826/243feca8-91bd-43e0-9ced-7d14dc63022e)
22
+
23
+
24
+
25
+ ### Feature Donation User
26
+
27
+ | Name | Status |
28
+ |---------------------------------------------|------------------|
29
+ | Proxy Support | ✅ |
30
+ | Auto Bypass Captcha | ✅ |
31
+ | Auto Bypass CloudFlare ( New Updates ) | ✅ |
32
+ | Full Http Request ( Selenium for bypass CloudFlare ) | ✅ |
33
+ | Detect status of services | ✅ |
34
+
35
+
36
+
37
+ # Old Version - Not Working again ❌
38
+
39
+
40
+ Automation does not require Selenium or any other browser to be interface with Zefoy Web, it does so directly using a Full Request API. Not running Selenium or Chromium saves you ram :D
41
+
42
+
43
+ https://user-images.githubusercontent.com/59155826/202221379-19774c47-fae0-4882-a949-9badfbdbce89.mp4
44
+
45
+
46
+
47
+ ## Feature
48
+
49
+ | Name | Status |
50
+ |---------------------------------------------|-----------------|
51
+ | Auto Bypass Captcha | ✅ |
52
+ | No Selenium / puppeteer | ✅ |
53
+ | Add New Services Shares , Hearts & Favorite | ✅ |
54
+ | Detect status of services | ✅ |
55
+ | Google Ads bypassed | ✅ |
56
+ | Windows exe added | Needs Update |
57
+ | Followers and Comments hearts | Coming Soon 🚀 |
58
+
59
+
60
+ ## Run Locally
61
+
62
+ Clone the project
63
+
64
+ ```bash
65
+ git clone https://github.com/sandrocods/Zefoy-Automation
66
+ ```
67
+
68
+ Go to the project directory
69
+
70
+ ```bash
71
+ cd Zefoy-Automation
72
+ ```
73
+
74
+ Install dependencies
75
+
76
+ ```bash
77
+ pip3 install -r requirements.txt
78
+ ```
79
+
80
+ Start the bot
81
+
82
+ ```bash
83
+ python3 main.py
84
+ ```
85
+
86
+ ## Update from previous version
87
+
88
+ Pull the latest version
89
+
90
+ ```bash
91
+ git pull
92
+ ```
93
+
94
+ Install new dependencies
95
+
96
+ ``` bash
97
+ pip3 install -r requirements.txt
98
+ ```
99
+
100
+ Run the bot
101
+
102
+ ```bash
103
+ python3 main.py
104
+ ```
105
+
106
+ ## For Windows Users
107
+ for windows users you can use the exe file in the output folder
108
+
109
+ Download the exe file from [here](https://github.com/sandrocods/Zefoy-Automation/blob/master/output/Zefoy%20Automation%20for%20Windows.exe)
110
+
111
+
112
+ ## Screenshots
113
+
114
+ ##### New Update show status of services
115
+ ![image](https://user-images.githubusercontent.com/59155826/198283383-f5d7e498-75e0-4022-9f50-c306effe06a5.png)
116
+
117
+ ##### Windows exe file
118
+ ![image](https://user-images.githubusercontent.com/59155826/198288637-2d2c4e0c-0833-44a9-92fa-21030284d669.png)
119
+
120
+ ##### Running Bot
121
+ ![image](https://user-images.githubusercontent.com/59155826/199298149-c7fba786-9a99-4871-91dc-73f158af3b03.png)
122
+
123
+ ##### Result
124
+ ![image](https://user-images.githubusercontent.com/59155826/190060159-ac0c94de-d39a-4077-a4cf-09869d06456e.png)
125
+
126
+ ![image](https://user-images.githubusercontent.com/59155826/198283698-68c04774-070e-47e8-9d58-1cf708502a07.png)
127
+
128
+ ## Donation User
129
+
130
+ [Donation User List](https://raw.githubusercontent.com/sandrocods/Zefoy-Automation/master/donation-userlist.md)
131
+
132
+
133
+
134
+
Binary file
@@ -0,0 +1,7 @@
1
+ # Donation User List 🍟
2
+ <img src="https://github.com/sandrocods/Zefoy-Automation/assets/59155826/84dc8d52-41d8-42b0-97c1-f58600ad8cf6" width="300" height="300" />
3
+ <img src="https://github.com/sandrocods/Zefoy-Automation/assets/59155826/a253b648-a870-40c8-9197-1a70feef6228" width="300" height="300" />
4
+ <img src="https://github.com/sandrocods/Zefoy-Automation/assets/59155826/0e3b998f-bcea-43e9-a2f6-d7904d20630e" width="300" height="300" />
5
+ <img src="https://github.com/sandrocods/Zefoy-Automation/assets/59155826/4289d750-a08f-4727-a814-0d098098919f" width="300" height="300" />
6
+ <img src="https://github.com/sandrocods/Zefoy-Automation/assets/59155826/727d300d-2ce9-494d-8943-5168442c66ff" width="300" height="300" />
7
+ <img src="https://github.com/sandrocods/Zefoy-Automation/assets/59155826/653f8628-dde0-480a-97d1-5a5cf4c0157e" width="300" height="300" />
@@ -0,0 +1,257 @@
1
+ import datetime
2
+ import random
3
+ import time
4
+ import inquirer
5
+ from colorama import init, Fore
6
+ from src import process
7
+ from prettytable import PrettyTable
8
+
9
+
10
+ def main():
11
+ init(autoreset=True)
12
+ inject = process.ZefoyViews()
13
+ inject.get_session_captcha()
14
+
15
+ print(Fore.GREEN + """
16
+ _____ _ _ __ ___
17
+ |_ _(_) |_\ \ / (_)_____ __ _____
18
+ | | | | / /\ V /| / -_) V V (_-<
19
+ |_| |_|_\_\ \_/ |_\___|\_/\_//__/
20
+ make with ❤️️ by @sandroputraa
21
+ """)
22
+ print(Fore.LIGHTYELLOW_EX + "Example: https://www.tiktok.com/@awokwokwokwkokwow/video/6865609642974743810")
23
+ url_video = input("Enter URL Video: ")
24
+ if url_video == "":
25
+ url_video = "https://www.tiktok.com/@awokwokwokwkokwow/video/6865609642974743810"
26
+ time.sleep(1)
27
+
28
+ if inject.post_solve_captcha(captcha_result=inject.captcha_solver()):
29
+
30
+ print("\n[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Success Solve Captcha" + "\n")
31
+
32
+ table = PrettyTable(field_names=["Services", "Status"], title="Status Services", header_style="upper",
33
+ border=True)
34
+ status_services = inject.get_status_services()
35
+ if not status_services: print("Failed to get status services, try again later"); exit()
36
+
37
+ valid_services = []
38
+ for service in status_services:
39
+ if service['name'] == 'Followers' or service['name'] == 'Comments Hearts':
40
+ continue
41
+ elif 'ago updated' in service['status']:
42
+ valid_services.append(service['name'])
43
+
44
+ table.add_row([service['name'], Fore.GREEN + service['status'] + Fore.RESET if 'ago updated' in service[
45
+ 'status'] else Fore.RED + service['status'] + Fore.RESET])
46
+
47
+ table.title = Fore.YELLOW + " Total Online Services: " + str(len(valid_services)) + Fore.RESET
48
+ print(table)
49
+
50
+ questions = [
51
+ inquirer.List('type', message="What services do you need?", choices=valid_services, carousel=True, ), ]
52
+ answers = inquirer.prompt(questions)
53
+
54
+ while True:
55
+
56
+ try:
57
+
58
+ if answers['type'] == 'Views':
59
+
60
+ while True:
61
+ inject_views = inject.send_multi_services(url_video=url_video, services=answers['type'], )
62
+
63
+ if inject_views:
64
+
65
+ if inject_views['message'] == "Please try again later":
66
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_views[
67
+ 'message'])
68
+ exit()
69
+
70
+ elif inject_views['message'] == 'Another State':
71
+ print("[ " + str(
72
+ datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Views: " +
73
+ inject_views['data'], end="\r")
74
+
75
+
76
+ elif inject_views['message'] == "Successfully views sent.":
77
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_views[
78
+ 'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + url_video + ", " + Fore.LIGHTGREEN_EX + "Current Views: " +
79
+ inject_views['data'], end="\n\n")
80
+ print()
81
+
82
+ elif inject_views['message'] == "Session Expired. Please Re Login!":
83
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_views[
84
+ 'message'])
85
+ exit()
86
+
87
+ elif inject_views['message'] == "Video not found.":
88
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_views[
89
+ 'message'])
90
+ exit()
91
+
92
+ else:
93
+ for i in range(int(inject_views['message']), 0, -1):
94
+ print("[ " + str(
95
+ datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
96
+ i) + " seconds to send views again.", end="\r")
97
+ time.sleep(1)
98
+
99
+ time.sleep(random.randint(1, 5))
100
+
101
+ else:
102
+ pass
103
+
104
+ elif answers['type'] == 'Shares':
105
+
106
+ while True:
107
+ inject_shares = inject.send_multi_services(url_video=url_video, services=answers['type'], )
108
+
109
+ if inject_shares:
110
+
111
+ if inject_shares['message'] == "Please try again later":
112
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_shares[
113
+ 'message'])
114
+ exit()
115
+
116
+ elif inject_shares['message'] == 'Another State':
117
+ print("[ " + str(
118
+ datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Shares : " +
119
+ inject_shares['data'], end="\n\n")
120
+ print()
121
+
122
+
123
+ elif inject_shares['message'] == "Shares successfully sent.":
124
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_shares[
125
+ 'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + Fore.LIGHTGREEN_EX + "Current Shares: " +
126
+ inject_shares['data'], end="\r")
127
+
128
+
129
+ elif inject_shares['message'] == "Session Expired. Please Re Login!":
130
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_shares[
131
+ 'message'])
132
+ exit()
133
+
134
+ elif inject_shares['message'] == "Video not found.":
135
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_shares[
136
+ 'message'])
137
+ exit()
138
+
139
+ else:
140
+ for i in range(int(inject_shares['message']), 0, -1):
141
+ print("[ " + str(
142
+ datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
143
+ i) + " seconds to send Shares again.", end="\r")
144
+ time.sleep(1)
145
+
146
+ time.sleep(random.randint(1, 5))
147
+
148
+ else:
149
+ pass
150
+
151
+ elif answers['type'] == 'Favorites':
152
+
153
+ while True:
154
+ inject_favorites = inject.send_multi_services(url_video=url_video, services=answers['type'], )
155
+
156
+ if inject_favorites:
157
+
158
+ if inject_favorites['message'] == "Please try again later":
159
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_favorites[
160
+ 'message'])
161
+ exit()
162
+
163
+ elif inject_favorites['message'] == 'Another State':
164
+ print("[ " + str(
165
+ datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Favorites : " +
166
+ inject_favorites['data'], end="\r")
167
+
168
+
169
+ elif inject_favorites['message'] == "Favorites successfully sent.":
170
+ print(
171
+ "[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_favorites[
172
+ 'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + url_video + Fore.LIGHTGREEN_EX + "Current Favorites : " +
173
+ inject_favorites['data'], end="\n\n")
174
+ print()
175
+
176
+ elif inject_favorites['message'] == "Session Expired. Please Re Login!":
177
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_favorites[
178
+ 'message'])
179
+ exit()
180
+
181
+ elif inject_favorites['message'] == "Video not found.":
182
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_favorites[
183
+ 'message'])
184
+ exit()
185
+
186
+
187
+ else:
188
+ for i in range(int(inject_favorites['message']), 0, -1):
189
+ print("[ " + str(
190
+ datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
191
+ i) + " seconds to send Favorites again.", end="\r")
192
+ time.sleep(1)
193
+
194
+ time.sleep(random.randint(1, 5))
195
+
196
+ else:
197
+ pass
198
+
199
+ elif answers['type'] == 'Hearts':
200
+
201
+ while True:
202
+ inject_hearts = inject.send_multi_services(url_video=url_video, services=answers['type'], )
203
+
204
+ if inject_hearts:
205
+
206
+ if inject_hearts['message'] == "Please try again later":
207
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_hearts[
208
+ 'message'])
209
+ exit()
210
+
211
+ elif inject_hearts['message'] == 'Another State':
212
+ print("[ " + str(
213
+ datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Hearts : " +
214
+ inject_hearts['data'], end="\r")
215
+
216
+
217
+ elif inject_hearts['message'] == "Hearts successfully sent.":
218
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_hearts[
219
+ 'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + url_video + Fore.LIGHTGREEN_EX + " Current Hearts: " +
220
+ inject_hearts['data'], end="\n\n")
221
+ print()
222
+
223
+ elif inject_hearts['message'] == "Session Expired. Please Re Login!":
224
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_hearts[
225
+ 'message'])
226
+ exit()
227
+
228
+ elif inject_hearts['message'] == "Video not found.":
229
+ print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_hearts[
230
+ 'message'])
231
+ exit()
232
+
233
+ else:
234
+ for i in range(int(inject_hearts['message']), 0, -1):
235
+ print("[ " + str(
236
+ datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
237
+ i) + " seconds to send Hearts again.", end="\r")
238
+ time.sleep(1)
239
+
240
+ time.sleep(random.randint(1, 5))
241
+
242
+ else:
243
+ pass
244
+
245
+ except Exception as e:
246
+ pass
247
+
248
+ else:
249
+ print(Fore.RED + "Failed to solve captcha.")
250
+
251
+
252
+ if __name__ == '__main__':
253
+ try:
254
+ main()
255
+ except KeyboardInterrupt:
256
+ print(Fore.RED + "Exit")
257
+ exit()
@@ -0,0 +1,5 @@
1
+ requests
2
+ beautifulsoup4
3
+ colorama
4
+ inquirer
5
+ prettytable
Binary file
@@ -0,0 +1,269 @@
1
+ from urllib.parse import urlparse
2
+ from bs4 import BeautifulSoup
3
+ import urllib.parse
4
+ import requests
5
+ import base64
6
+ import re
7
+
8
+ #
9
+ # for debug
10
+ # from requests_toolbelt.utils import dump
11
+
12
+
13
+ class ZefoyViews:
14
+ API_ZEFOY = 'https://zefoy.com/'
15
+ API_VISION = 'https://api.sandroputraa.com/zefoy.php'
16
+
17
+ STATIC_HEADERS = {
18
+ "Host": "zefoy.com",
19
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36",
20
+ "x-requested-with": "XMLHttpRequest",
21
+ "origin": "https://zefoy.com",
22
+ }
23
+
24
+ STATIC_ENDPOINT = {}
25
+
26
+ def __init__(self):
27
+ self.key_views = None
28
+ self.session = requests.Session()
29
+ self.captcha = None
30
+ self.phpsessid = None
31
+
32
+ def google_ads_inject(self):
33
+
34
+ request_gfp = self.session.get(
35
+ url='https://partner.googleadservices.com/gampad/cookie.js?domain=zefoy.com&callback=_gfp_s_&client=ca-pub-3192305768699763&gpid_exp=1 ',
36
+ headers={
37
+ "Host": "partner.googleadservices.com",
38
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36",
39
+ }
40
+ )
41
+
42
+ self.session.cookies.set("_gads", request_gfp.text.strip().split('_value_":"')[1].split('","_expires_')[0],
43
+ domain='zefoy.com')
44
+ self.session.cookies.set("__gpi", request_gfp.text.strip().split('_value_":"')[2].split('","_expires_')[0],
45
+ domain='zefoy.com')
46
+
47
+ def captcha_solver(self):
48
+ try:
49
+ solve_captcha = requests.post(
50
+ url=self.API_VISION,
51
+ headers={
52
+ 'Content-Type': 'application/json',
53
+ 'Auth': 'sandro_putraa',
54
+ 'Host': 'api.sandroputraa.com',
55
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36',
56
+ },
57
+ json={
58
+ "img": base64.b64encode(open('captcha.png', 'rb').read()).decode('utf-8')
59
+ }
60
+ )
61
+
62
+ if "RESOURCE_EXHAUSTED" in solve_captcha.text:
63
+ exit("API Limit Reached")
64
+
65
+ if "PERMISSION_DENIED" in solve_captcha.text:
66
+ exit("API Limit Reached")
67
+
68
+ if not solve_captcha.json()['Data'].isascii():
69
+ return "reload"
70
+
71
+ # is special character in captcha
72
+ if any(char in solve_captcha.json()['Data'] for char in
73
+ ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '_', '+', '=', '[', ']', '{', '}', '|', ';',
74
+ ':', '"', "'", ',', '<', '.', '>', '/', '?']):
75
+ return "reload"
76
+
77
+ # is number in captcha
78
+ if any(char.isdigit() for char in solve_captcha.json()['Data']):
79
+ return "reload"
80
+
81
+ if solve_captcha.status_code == 200 and solve_captcha.json()['message'] == 'Success':
82
+
83
+ return solve_captcha.json()['Data'].split('\n')[0].strip()
84
+
85
+ else:
86
+ exit("Error: " + solve_captcha.json()['message'])
87
+
88
+ except TypeError:
89
+ return "reload"
90
+
91
+ def get_session_captcha(self):
92
+
93
+ homepage = self.session.get(
94
+ url=self.API_ZEFOY,
95
+ headers=self.STATIC_HEADERS
96
+ )
97
+ soup = BeautifulSoup(homepage.text, 'html.parser')
98
+
99
+ if homepage.cookies.get_dict().get('gfp') is None:
100
+ self.google_ads_inject()
101
+
102
+ # Download Captcha Image
103
+ try:
104
+
105
+ request_captcha_image = self.session.get(
106
+ url=self.API_ZEFOY + soup.find('img', {'alt': 'CAPTCHA code'}).get('src'),
107
+ headers=self.STATIC_HEADERS,
108
+ )
109
+
110
+ with open('captcha.png', 'wb') as f:
111
+ f.write(request_captcha_image.content)
112
+
113
+ except AttributeError:
114
+ self.get_session_captcha()
115
+
116
+ def post_solve_captcha(self, captcha_result):
117
+ try:
118
+
119
+ self.STATIC_HEADERS['content-type'] = "application/x-www-form-urlencoded; charset=UTF-8"
120
+
121
+ post_captcha = self.session.post(
122
+ url=self.API_ZEFOY,
123
+ headers=self.STATIC_HEADERS,
124
+ data={
125
+ 'captcha_secure': captcha_result,
126
+ 'r75619cf53f5a5d7aa6af82edfec3bf0': '',
127
+ }
128
+ )
129
+ soup = BeautifulSoup(post_captcha.text, 'html.parser')
130
+ self.key_views = soup.find('input', {'placeholder': 'Enter Video URL'}).get('name')
131
+ return True
132
+ except Exception as e:
133
+ return "Error: " + str(e)
134
+
135
+ def get_status_services(self):
136
+ try:
137
+ temp_status_1 = []
138
+ temp_status_2 = []
139
+
140
+ self.STATIC_HEADERS['content-type'] = "application/x-www-form-urlencoded; charset=UTF-8"
141
+
142
+ get_status_services = self.session.get(
143
+ url=self.API_ZEFOY,
144
+ headers=self.STATIC_HEADERS,
145
+ )
146
+ soup = BeautifulSoup(get_status_services.text, 'html.parser')
147
+
148
+ for x in soup.find_all('div', {'class': 'col-sm-9 col-xs-12 p-1 container'}):
149
+ temp_status_1.append({
150
+ 'name': x.find('h5').text.strip(),
151
+ 'key': x.find('form').get('action').strip(),
152
+ })
153
+
154
+ for i in soup.find_all('div', {'class': 'col-sm-4 col-xs-12 p-1 colsmenu'}):
155
+ temp_status_2.append({
156
+ 'name': i.findNext('h5').text.strip(),
157
+ 'status': i.findNext('small').text.strip()
158
+ })
159
+
160
+ for key in temp_status_1:
161
+ for status in temp_status_2:
162
+ if key['name'] == status['name']:
163
+ self.STATIC_ENDPOINT.update(
164
+ {
165
+ status['name']: key['key']
166
+ }
167
+ )
168
+
169
+ return temp_status_2
170
+
171
+ except Exception:
172
+ self.get_status_services()
173
+
174
+ def send_multi_services(self, url_video, services):
175
+ global soup
176
+ try:
177
+
178
+ self.STATIC_HEADERS['content-type'] = "application/x-www-form-urlencoded; charset=UTF-8"
179
+
180
+ post_services = self.session.post(
181
+ url=self.API_ZEFOY + self.STATIC_ENDPOINT[services],
182
+ headers=self.STATIC_HEADERS,
183
+ data={
184
+ self.key_views: url_video,
185
+ },
186
+ )
187
+
188
+ decode_old = base64.b64decode(urllib.parse.unquote(post_services.text[::-1])).decode()
189
+ soup = BeautifulSoup(decode_old, 'html.parser')
190
+ if "This service is currently not working" in soup.text:
191
+ exit("This service is currently not working")
192
+
193
+ if "An error occurred. Please try again." in decode_old:
194
+
195
+ decode = self.force_send_multi_services(
196
+ url_video=url_video,
197
+ old_request=decode_old,
198
+ services=services
199
+ )
200
+
201
+ # print("Force Send: " + decode.__str__())
202
+ soupDecode = BeautifulSoup(decode, 'html.parser')
203
+ if "Successfully " + services.lower() + " sent." in soupDecode.text:
204
+ return {
205
+ 'message': 'Successfully ' + services.lower() + ' sent.',
206
+ 'data': soup.find('button').text.strip()
207
+ }
208
+
209
+ elif services + " successfully sent" in soupDecode.find('span').text:
210
+ return {
211
+ 'message': services + ' successfully sent.',
212
+ 'data': soup.find('button').text.strip() + " > " + soupDecode.find('span').text.strip()
213
+ }
214
+
215
+ else:
216
+ return {
217
+ 'message': 'Another State',
218
+ 'data': soup.find('button').text.strip()
219
+ }
220
+
221
+ elif "Successfully " + services.lower() + " sent." in decode_old:
222
+ return {
223
+ 'message': 'Successfully ' + services.lower() + ' sent.',
224
+ 'data': soup.find('button').text.strip()
225
+ }
226
+
227
+ elif "Session Expired. Please Re Login!" in decode_old:
228
+ return {
229
+ 'message': 'Please try again later. Server too busy.',
230
+ }
231
+
232
+ elif "Not found video." in decode_old:
233
+ return {
234
+ 'message': 'Video not found.',
235
+ }
236
+
237
+ # Getting Timer
238
+ try:
239
+
240
+ return {
241
+ 'message': re.search(r"var ltm=[0-9]+;", decode_old).group(0).replace("ltm=", "") \
242
+ .replace(";", "").replace("var", "").strip()
243
+ }
244
+ except:
245
+ pass
246
+
247
+ except Exception as e:
248
+
249
+ return "Error: " + str(e)
250
+
251
+ def force_send_multi_services(self, url_video, services, old_request):
252
+ if 'tiktok' in url_video:
253
+ if len(urlparse(url_video).path.split('/')[-1]) == 19:
254
+ valid_id = urlparse(url_video).path.split('/')[-1]
255
+ else:
256
+ return False
257
+ else:
258
+ return False
259
+
260
+ parse = BeautifulSoup(old_request, 'html.parser')
261
+ request_force_multiple_services = self.session.post(
262
+ url=self.API_ZEFOY + self.STATIC_ENDPOINT[services],
263
+ headers=self.STATIC_HEADERS,
264
+ data={
265
+ parse.find('input', {'type': 'text'}).get('name'): valid_id,
266
+ }
267
+ )
268
+ decode = base64.b64decode(urllib.parse.unquote(request_force_multiple_services.text[::-1])).decode()
269
+ return decode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerdlz23",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "scripts": {
5
5
  "dev": "next dev",
6
6
  "build": "next build",