Fix BABS + cleanup anime-ultime
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
de760030ca
commit
476105c824
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"editor.formatOnSave": false
|
||||||
|
}
|
@ -42,7 +42,7 @@ standalone_episode_regexs = [
|
|||||||
'(.*?)( \(([0-9]+)\))?[Ss]([0-9]+)+[Ee]([0-9]+)(-[0-9]+[Xx]([0-9]+))?( - (.*))?' # standard s00e00
|
'(.*?)( \(([0-9]+)\))?[Ss]([0-9]+)+[Ee]([0-9]+)(-[0-9]+[Xx]([0-9]+))?( - (.*))?' # standard s00e00
|
||||||
]
|
]
|
||||||
|
|
||||||
season_regex = '.*?(?P<season>[0-9]{1,2})+(?![^\(]*\))' # folder for a season
|
season_regex = '.*?(?P<season>[0-9]{1,2})+(?![^\(\[]*[\)\]])' # folder for a season
|
||||||
|
|
||||||
just_episode_regexs = [
|
just_episode_regexs = [
|
||||||
'(?P<ep>[0-9]{1,3})[\. -_]*of[\. -_]*[0-9]{1,3}', # 01 of 08
|
'(?P<ep>[0-9]{1,3})[\. -_]*of[\. -_]*[0-9]{1,3}', # 01 of 08
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import argparse
|
import argparse
|
||||||
import re
|
import re
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@ -17,26 +16,37 @@ root_url = 'http://www.anime-ultime.net'
|
|||||||
|
|
||||||
while nextHop:
|
while nextHop:
|
||||||
r1 = requests.get(url)
|
r1 = requests.get(url)
|
||||||
m1 = re.search("javascript:open_ddlbox\('dl_orig', '([0-9]+)', 'orig'\)", r1.text)
|
m1 = re.search(
|
||||||
m2 = re.search('submit.*:right;.*(info-0-1)/([0-9]+)/([^"]+)', r1.text)
|
"javascript:open_ddlbox\('dl_orig', '([0-9]+)', 'orig'\)", r1.text
|
||||||
requests.post(root_url + '/ddl/authorized_download.php',
|
)
|
||||||
data={'idfile': m1.group(1), 'type': 'orig'})
|
m2 = re.search(
|
||||||
|
'submit.*:right;.*(info-0-1)/([0-9]+)/([^"]+)', r1.text
|
||||||
|
)
|
||||||
|
requests.post(
|
||||||
|
root_url + '/ddl/authorized_download.php',
|
||||||
|
data={'idfile': m1.group(1), 'type': 'orig'}
|
||||||
|
)
|
||||||
|
|
||||||
timeout = 46
|
timeout = 46
|
||||||
while timeout > 0:
|
while timeout > 0:
|
||||||
sys.stdout.write('\r')
|
sys.stdout.write('\r')
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
sys.stdout.write('Veuillez attendre ' + str(timeout) + ' secondes')
|
sys.stdout.write('Waiting ' + str(timeout) + ' seconds ...')
|
||||||
timeout = timeout - 1
|
timeout = timeout - 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
r2 = requests.post(root_url + '/ddl/authorized_download.php',
|
r2 = requests.post(
|
||||||
data={'idfile': m1.group(1), 'type': 'orig'})
|
root_url + '/ddl/authorized_download.php',
|
||||||
|
data={'idfile': m1.group(1), 'type': 'orig'}
|
||||||
|
)
|
||||||
j = r2.json()
|
j = r2.json()
|
||||||
subprocess.call('wget -c -t 0 --content-disposition "' + root_url + j['link'] + '"', shell=True)
|
subprocess.call('wget -c -t 0 --content-disposition "' +
|
||||||
|
root_url + j['link'] + '"', shell=True)
|
||||||
|
|
||||||
if m2 is None:
|
if m2 is None:
|
||||||
nextHop = False
|
nextHop = False
|
||||||
sys.stdout.write('\r')
|
sys.stdout.write('\r')
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
else:
|
else:
|
||||||
url = root_url + '/' + m2.group(1) + '/' + m2.group(2) + '/' + m2.group(3)
|
url = root_url + '/' + \
|
||||||
|
m2.group(1) + '/' + m2.group(2) + '/' + m2.group(3)
|
||||||
|
Loading…
Reference in New Issue
Block a user