# -*- coding: utf-8 -*-

import re

from module.plugins.internal.SimpleCrypter import SimpleCrypter


class FiredriveComFolder(SimpleCrypter):
    __name__ = "FiredriveComFolder"
    __type__ = "crypter"
    __version__ = "0.02"

    __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/share/.+'

    __description__ = """Firedrive.com folder decrypter plugin"""
    __license__ = "GPLv3"
    __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]


    LINK_PATTERN = r'<div class="pf_item pf_(file|folder).+?public=\'(.+?)\''
    TITLE_PATTERN = r'>Shared Folder "(.+)" | Firedrive<'
    OFFLINE_PATTERN = r'class="sad_face_image"|>No such page here.<'
    TEMP_OFFLINE_PATTERN = r'>(File Temporarily Unavailable|Server Error. Try again later)'


    def getLinks(self):
        return map(lambda x: "http://www.firedrive.com/%s/%s" %
                   ("share" if x[0] == "folder" else "file", x[1]),
                   re.findall(self.LINK_PATTERN, self.html))

@@ -22,19 +22,8 @@
 *-%0A%0A
-import re%0A%0A
 from
@@ -47,22 +47,20 @@
 nternal.
-Simple
+Dead
 Crypter 
@@ -66,22 +66,20 @@
  import 
-Simple
+Dead
 Crypter%0A
@@ -109,14 +109,12 @@
 der(
-Simple
+Dead
 Cryp
@@ -206,9 +206,9 @@
 %220.0
-2
+3
 %22%0A%0A 
@@ -439,522 +439,4 @@
 %22)%5D%0A
-%0A%0A    LINK_PATTERN = r'%3Cdiv class=%22pf_item pf_(file%7Cfolder).+?public=%5C'(.+?)%5C''%0A    TITLE_PATTERN = r'%3EShared Folder %22(.+)%22 %7C Firedrive%3C'%0A    OFFLINE_PATTERN = r'class=%22sad_face_image%22%7C%3ENo such page here.%3C'%0A    TEMP_OFFLINE_PATTERN = r'%3E(File Temporarily Unavailable%7CServer Error. Try again later)'%0A%0A%0A    def getLinks(self):%0A        return map(lambda x: %22http://www.firedrive.com/%25s/%25s%22 %25%0A                   (%22share%22 if x%5B0%5D == %22folder%22 else %22file%22, x%5B1%5D),%0A                   re.findall(self.LINK_PATTERN, self.html))%0A

Mark dead