Skip to content

Commit cfe8250

Browse files
nmssGammaC0de
authored andcommitted
[DlFreeFr] Fix short url handling (pyload#2689)
1 parent 1b9ff64 commit cfe8250

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

module/plugins/hoster/DlFreeFr.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class DlFreeFr(SimpleHoster):
77
__name__ = "DlFreeFr"
88
__type__ = "hoster"
9-
__version__ = "0.36"
9+
__version__ = "0.37"
1010
__status__ = "testing"
1111

1212
__pattern__ = r'http://(?:www\.)?dl\.free\.fr/(getfile\.pl\?file=/|[a-z])(?P<ID>\w+)'
@@ -21,8 +21,8 @@ class DlFreeFr(SimpleHoster):
2121
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
2222

2323

24-
NAME_PATTERN = r'Fichier:</td>\s*<td.*?>(?P<N>[^>]*)</td>'
25-
SIZE_PATTERN = r'Taille:</td>\s*<td.*?>(?P<S>[\d.,]+)(?P<U>\w+)'
24+
NAME_PATTERN = r'Fichier</span>\s*<span.*?>(?P<N>[^<]*)</span>'
25+
SIZE_PATTERN = r'Taille</span>\s*<span.*?>(?P<S>[\d.,]+)(?P<U>\w+)</span>'
2626
OFFLINE_PATTERN = r'>ERREUR 404|Fichier inexistant'
2727

2828

@@ -32,8 +32,9 @@ def setup(self):
3232
self.limitDL = 5
3333
self.chunk_limit = 1
3434

35+
def process(self, pyfile):
36+
pyfile.url = 'http://dl.free.fr/getfile.pl?file=/' + self.info['pattern']['ID']
37+
super(DlFreeFr, self).process(pyfile)
3538

3639
def handle_free(self, pyfile):
37-
self.download("http://dl.free.fr/getfile.pl",
38-
post={'file': '/' + self.info['pattern']['ID'],
39-
'send': "Valider+et+télécharger+le+fichier"})
40+
self.download('http://dl.free.fr/v' + self.info['pattern']['ID'])

0 commit comments

Comments
 (0)