|
|
@@ -8,6 +8,7 @@ import subprocess
|
|
|
from parsers.episode import episodeParser
|
|
|
from parsers.lesezeichen import lesezeichenParser
|
|
|
from parsers.chapter import chapterParser
|
|
|
+from parsers.player import playerParser
|
|
|
|
|
|
def main():
|
|
|
while True:
|
|
|
@@ -49,18 +50,6 @@ def main():
|
|
|
if uin =='99':
|
|
|
exit()
|
|
|
|
|
|
-def chapter_dummy():
|
|
|
- #url = 'https://proxer.me' + ep['link'].replace('chapter','read').replace('#top','')+'/1'
|
|
|
- #print(url)
|
|
|
- #response = sess.get(url)
|
|
|
- f = open('dummys/chapter.html','r')
|
|
|
- content = f.readlines()
|
|
|
- f.close()
|
|
|
- chapPars = chapterParser()
|
|
|
- chapPars.feed(str(content))
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
def chapter(sess,ep):
|
|
|
url = 'https://proxer.me' + ep['link'].replace('chapter','read').replace('#top','')+'/1'
|
|
|
response = sess.get(url)
|
|
|
@@ -70,31 +59,40 @@ def chapter(sess,ep):
|
|
|
path = 'manga/'+ep['name']+'/'+ep['num']+'/'
|
|
|
if not os.path.exists(path):
|
|
|
os.makedirs(path)
|
|
|
+ print(str(ep))
|
|
|
print(chapPars.serverurl)
|
|
|
count = 0
|
|
|
print("1 - Download")
|
|
|
print("2 - mark as read")
|
|
|
uin = input('$>: ')
|
|
|
if uin == '1':
|
|
|
+ print(path)
|
|
|
for p in tqdm(chapPars.images):
|
|
|
- call(['curl',chapPars.serverurl + p['file'],'-o',path+str(count).zfill(3)+p['file'][p['file'].rindex('.'):]])
|
|
|
+ call(['curl',chapPars.serverurl + p['file'],'-o',path+str(count).zfill(2)+p['file'][p['file'].rindex('.'):]])
|
|
|
count +=1
|
|
|
|
|
|
if uin == '2':
|
|
|
- url = 'https://proxer.me' + ep['link'].replace('#top','?format=json&type=reminder&'+ auth.token +'=1&title=reminder_next')
|
|
|
- response = sess.post(url,data = {'check':'1'})
|
|
|
+ url = 'https://proxer.me' + ep['link'].replace('#top','?format=json&type=reminder&'+ chapPars.token +'=1&title=reminder_next')
|
|
|
+ response = sess.post(url,data = {"check":1})
|
|
|
+ print(url)
|
|
|
print(str(response.content))
|
|
|
|
|
|
def episode(sess,ep):
|
|
|
response = sess.get('https://proxer.me'+ep['link'])
|
|
|
content = response.content
|
|
|
+ print(str(content))
|
|
|
epars = episodeParser()
|
|
|
epars.feed(str(content))
|
|
|
code = epars.code
|
|
|
- link = "https://s3-psc.proxer.me/files/0/"+code+"/video.mp4"
|
|
|
+ link = 'https:'+epars.url.replace('#',code)
|
|
|
+ response = sess.get(link)
|
|
|
+ ppars = playerParser()
|
|
|
+ ppars.feed(str(response.content))
|
|
|
+ link = ppars.url
|
|
|
print(link)
|
|
|
print('1 - open with vlc')
|
|
|
print('2 - download')
|
|
|
+ print('3 - mark as watched')
|
|
|
path = 'anime/'+ep['name']+'/'
|
|
|
if not os.path.exists(path):
|
|
|
os.makedirs(path)
|
|
|
@@ -103,27 +101,15 @@ def episode(sess,ep):
|
|
|
call(["vlc", link])
|
|
|
if uin == '2':
|
|
|
call(['curl',link,'-o',path+ep['num']+'.mp4'])
|
|
|
-
|
|
|
-def episode_test():
|
|
|
- f = open('dummys/episode.html','r')
|
|
|
- content = f.readlines()
|
|
|
- f.close()
|
|
|
- epars = episodeParser()
|
|
|
- epars.feed(str(content))
|
|
|
- code = epars.code
|
|
|
- link = "https://s3-psc.proxer.me/files/0/"+code+"/video.mp4"
|
|
|
- print(link)
|
|
|
- print('1 - open with vlc')
|
|
|
- print('2 - download')
|
|
|
- uin = input('$>: ')
|
|
|
- if uin == '1':
|
|
|
- os.popen('vlc '+link)
|
|
|
- #x = subprocess.run(['bash','vlc',link])
|
|
|
- #call(["vlc", link])
|
|
|
- if uin == '2':
|
|
|
- call(['curl',link,'-o','test.mp4'])
|
|
|
+ if uin == '3':
|
|
|
+ url = 'https://proxer.me' + ep['link'].replace('#top','?format=json&type=reminder&'+ epars.token +'=1&title=reminder_next')
|
|
|
+ response = sess.post(url,data = {"check":1})
|
|
|
+ print(url)
|
|
|
+ print(str(response.content))
|
|
|
|
|
|
def LesezeichenAll(sess):
|
|
|
+ watchlist = []
|
|
|
+ readlist = []
|
|
|
response = sess.get('https://proxer.me/ucp?s=reminder&utm_source=nav#top')
|
|
|
lpars = lesezeichenParser()
|
|
|
content = response.content
|
|
|
@@ -172,28 +158,5 @@ def LesezeichenSingle(sess,mode):
|
|
|
f.write(str(response.content))
|
|
|
f.close
|
|
|
print('written')
|
|
|
-
|
|
|
-def LesezeichenD():
|
|
|
- lpars = lesezeichenParser()
|
|
|
- f = open('dump.html','r')
|
|
|
- content = f.readlines()
|
|
|
- lpars.feed(str(content))
|
|
|
- watchlist = lpars.watchlist
|
|
|
- readlist = lpars.readlist
|
|
|
- print('----------------------------')
|
|
|
- print('watchlist')
|
|
|
- for i in range (0,len(watchlist) - 1):
|
|
|
- print('w' + str(i) + ' - ' + watchlist[i]['name'] + ' - ' + str(watchlist[i]['new']))
|
|
|
- print('readlist')
|
|
|
- for i in range (0,len(readlist) - 1):
|
|
|
- print('r' + str(i) + ' - ' + readlist[i]['name'] + ' - ' + str(readlist[i]['new']))
|
|
|
- print(str(readlist))
|
|
|
- uin = input('$>: ')
|
|
|
- link = ''
|
|
|
- if uin[0] == 'w':
|
|
|
- link = watchlist[int(uin.replace('w',''))]['link']
|
|
|
- else:
|
|
|
- link = readlist[int(uin.replace('r',''))]['link']
|
|
|
- print(link)
|
|
|
|
|
|
main()
|