forked from gavazquez/ReloadCam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DELETED_ReloadCam_Server_Mario.py
52 lines (44 loc) · 2.05 KB
/
DELETED_ReloadCam_Server_Mario.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Refrescador automatico de clines
#Creado por Dagger - https://github.com/gavazquez
import ReloadCam_Main, ReloadCam_Helper
def GetVersion():
return 5
#Filename must start with Server, classname and argument must be the same!
class Mario(ReloadCam_Main.Server):
def GetUrl(self, serverNo):
#Pon un breakpoint aqui si quieres ver la URL verdadera ;)
#'http://www.mariocccam.tk/Mario/M1/'
if (serverNo <= 4):
realUrl = ReloadCam_Helper.Decrypt('maanpH1wfOnc453OxaObopempK7fk-DakLGSpJyjco5-oQ==')
elif (serverNo >= 5 and serverNo <= 8):
realUrl = ReloadCam_Helper.Decrypt('maanpH1wfOnc453OxaObopempK7fk-DakLGSpJyjco5_oQ==')
elif (serverNo >= 9):
realUrl = ReloadCam_Helper.Decrypt('maanpH1wfOnc453OxaObopempK7fk-DakLGSpJyjco6AoQ==')
realUrl = realUrl + 'M' + str(serverNo)
return realUrl
def GetClines(self):
print "Now getting Mario clines!"
marioClines = []
marioClines.append(self.__GetMarioCline(1))
marioClines.append(self.__GetMarioCline(2))
marioClines.append(self.__GetMarioCline(3))
marioClines.append(self.__GetMarioCline(4))
marioClines.append(self.__GetMarioCline(5))
marioClines.append(self.__GetMarioCline(6))
marioClines.append(self.__GetMarioCline(7))
marioClines.append(self.__GetMarioCline(8))
marioClines.append(self.__GetMarioCline(9))
marioClines.append(self.__GetMarioCline(10))
marioClines.append(self.__GetMarioCline(11))
marioClines.append(self.__GetMarioCline(12))
marioClines = filter(None, marioClines)
if len(marioClines) == 0: print "No Mario lines retrieved"
return marioClines
def __GetMarioCline(self, serverNo):
htmlCode = ReloadCam_Helper.GetHtmlCode(None, self.GetUrl(serverNo))
cline = ReloadCam_Helper.FindStandardClineInText(htmlCode)
if cline != None and ReloadCam_Helper.TestCline(cline):
return cline
return None