|
|
@@ -12,6 +12,9 @@ from parsers.lesezeichen import lesezeichenParser
|
|
|
from parsers.chapter import chapterParser
|
|
|
from parsers.player import playerParser
|
|
|
|
|
|
+
|
|
|
+baseurl = ''
|
|
|
+
|
|
|
if os.path.isfile('cookies'):
|
|
|
f = open('cookies','rb')
|
|
|
sess = requests.session()
|
|
|
@@ -45,7 +48,7 @@ def main():
|
|
|
if uin == '1':
|
|
|
user = input('username: ')
|
|
|
pw = getpass('password:' )
|
|
|
- sess = auth.login(user,pw)
|
|
|
+ sess = auth.login(user,pw,config)
|
|
|
print(str(auth.token))
|
|
|
f = open(config['paths']['cookie_jar'],'wb')
|
|
|
pickle.dump(sess.cookies,f)
|
|
|
@@ -63,7 +66,7 @@ def main():
|
|
|
exit()
|
|
|
|
|
|
def chapter(sess,ep):
|
|
|
- url = 'https://proxer.me' + ep['link'].replace('chapter','read').replace('#top','')+'/1'
|
|
|
+ url = baseurl + ep['link'].replace('chapter','read').replace('#top','')+'/1'
|
|
|
response = sess.get(url)
|
|
|
content = response.content
|
|
|
chapPars = chapterParser()
|
|
|
@@ -93,12 +96,12 @@ def chapter(sess,ep):
|
|
|
count +=1
|
|
|
|
|
|
if uin == '2':
|
|
|
- url = 'https://proxer.me' + ep['link'].replace('#top','?format=json&type=reminder&'+ chapPars.token +'=1&title=reminder_next')
|
|
|
+ url = baseurl + ep['link'].replace('#top','?format=json&type=reminder&'+ chapPars.token +'=1&title=reminder_next')
|
|
|
response = sess.post(url,data = {"check":1})
|
|
|
print(str(response.content))
|
|
|
|
|
|
if uin == '5':
|
|
|
- url = 'https://proxer.me' + ep['link'].replace('#top','?format=json&type=reminder&'+ chapPars.token +'=1&title=reminder_this')
|
|
|
+ url = baseurl + ep['link'].replace('#top','?format=json&type=reminder&'+ chapPars.token +'=1&title=reminder_this')
|
|
|
response = sess.post(url,data = {"check":1})
|
|
|
print(str(response.content))
|
|
|
|
|
|
@@ -125,7 +128,7 @@ def chapter(sess,ep):
|
|
|
break
|
|
|
|
|
|
def episode(sess,ep):
|
|
|
- response = sess.get('https://proxer.me'+ep['link'])
|
|
|
+ response = sess.get(baseurl+ep['link'])
|
|
|
content = response.content
|
|
|
epars = episodeParser()
|
|
|
epars.feed(str(content))
|
|
|
@@ -154,7 +157,7 @@ def episode(sess,ep):
|
|
|
if uin == '2':
|
|
|
call(['curl',link,'-o',path+ep['num']+'.mp4'])
|
|
|
if uin == '3':
|
|
|
- url = 'https://proxer.me' + ep['link'].replace('#top','?format=json&type=reminder&'+ epars.token +'=1&title=reminder_next')
|
|
|
+ url = baseurl + ep['link'].replace('#top','?format=json&type=reminder&'+ epars.token +'=1&title=reminder_next')
|
|
|
response = sess.post(url,data = {"check":1})
|
|
|
print(str(response.content))
|
|
|
|
|
|
@@ -226,8 +229,11 @@ def LesezeichenSingle(sess,mode):
|
|
|
|
|
|
def ReadConfig():
|
|
|
global config
|
|
|
+ global baseurl
|
|
|
config = configparser.ConfigParser()
|
|
|
config.read_file(open('settings.cfg'))
|
|
|
+ baseurl = config['urls']['base_url']
|
|
|
+
|
|
|
|
|
|
def ListLocal():
|
|
|
anime = []
|