freeapp commited on
Commit
1d70768
·
1 Parent(s): 4f0b3e0

Upload 2 files

Browse files
Files changed (2) hide show
  1. Requirements --_--.txt +9 -0
  2. tabligh.py +80 -0
Requirements --_--.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ pycryptodome==3.10.1
2
+ requests
3
+ googletrans==3.1.0a0
4
+ pillow
5
+ arabic-reshaper
6
+ python-bidi
7
+ mutagen
8
+ gtts
9
+ rubpy==3.1.1
tabligh.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from rubpy import Rubika
2
+ from re import findall
3
+ from time import sleep
4
+ import asyncio
5
+
6
+ bot = Rubika("ejsdcmpaibmctfmdsofnntsazrgxfqjp")
7
+ channel_guid : str = "c0Ee9X09008b057804dadf8f941e305a"
8
+
9
+ post_link: str = "https://rubika.ir/free__aep/DCAIDJJGICAABGB"
10
+
11
+ get_infos: list = []
12
+ links = []
13
+
14
+ async def main():
15
+ t: bool = False
16
+ while(t != True):
17
+ try:
18
+ message_info: str = await bot.getLinkFromAppUrl(post_link)
19
+ global get_infos
20
+ get_infos.append(message_info['message_id'])
21
+ get_infos.append(message_info['object_guid'])
22
+ t: bool = True
23
+ except:
24
+ t: bool = False
25
+
26
+ t: bool = False
27
+ while(t!=True):
28
+ try:
29
+ messages : list = await bot.getMessagesInterval(channel_guid, await bot.getChannelLastMessageId(channel_guid))
30
+ t:bool=True
31
+ except:
32
+ t:bool=False
33
+ for msg in messages:
34
+ try:
35
+ msg = msg['text']
36
+ group_link = findall(r"https://rubika.ir/joing/\w{32}", msg)
37
+ for link in group_link:
38
+ links.append(link)
39
+ except: pass
40
+
41
+ while(1):
42
+ for link in links:
43
+ t:bool=False
44
+ count:int=0
45
+ limit:int=5
46
+ while(count<5 and t!=True):
47
+ try:
48
+ group_guid:str= await bot.joinGroup(link)
49
+ group_guid: str = group_guid.get('data').get('group').get('group_guid')
50
+ t:bool=True
51
+ count += 5
52
+ except:
53
+ t:bool=False
54
+ count += 1
55
+ t:bool=False
56
+ count:int=0
57
+ limit:int=5
58
+ while(count<5 and t!=True):
59
+ try:
60
+ # await bot.sendMessage(group_guid, "تبلیغ")
61
+ await bot.forwardMessages(get_infos[1], [get_infos[0]], group_guid)
62
+ print('Sended!')
63
+ t:bool=True
64
+ count+=5
65
+ except:
66
+ t:bool=False
67
+ count+=1
68
+ t:bool=False
69
+ count:int=0
70
+ limit:int=5
71
+ while(count<5 and t!=True):
72
+ try:
73
+ await bot.leaveGroup(group_guid)
74
+ t:bool=True
75
+ count+=5
76
+ except:
77
+ t:bool=False
78
+ count+=1
79
+
80
+ asyncio.run(main())