# Buggy code
def prepare(self):
    """Initialize important variables"""
    if not hasattr(self, "HOSTER_NAME"):
        self.HOSTER_NAME = re.search(self.__pattern__, self.pyfile.url).group(1)
    if not hasattr(self, "DIRECT_LINK_PATTERN"):
        self.DIRECT_LINK_PATTERN = (
            r'(http://([^/]*?%s|\d+\.\d+\.\d+\.\d+)(:\d+/d/|/files/\d+/\w+/)[^"\'<]+)'
            % self.HOSTER_NAME
        )

    self.captcha = self.errmsg = None
    self.passwords = self.getPassword().splitlines()


# Traceback (PluginParseError)
04.09.2013 23:38:59 DEBUG     XFileSharingPro: Pattern loaded - handling 81 hosters
04.09.2013 23:38:59 INFO      pyLoad is up and running
04.09.2013 23:39:01 INFO      UpdateManager: No Updates for pyLoad
04.09.2013 23:39:01 INFO      UpdateManager: No plugin updates available
04.09.2013 23:39:13 DEBUG     Redirected import module.plugins.hoster.XFileSharingPro -> userplugins.hoster.XFileSharingPro
04.09.2013 23:39:13 DEBUG     Redirected import module.plugins.internal.CaptchaService -> userplugins.internal.CaptchaService
04.09.2013 23:39:13 INFO      Download starts: Zone-Telechargement.comNCIS.S10E14.FRENCH.LD.HDTV.XviD-MiND.avi
04.09.2013 23:39:21 DEBUG     UptoboxCom: URL: http://uptobox.com/d507fg2b4w9b
04.09.2013 23:39:21 DEBUG     UptoboxCom: {'status': 3, 'name': '', 'size': 0}
04.09.2013 23:39:21 DEBUG     UptoboxCom: uptobox.com | {u'rand': u'v5pcjltbkge65ychada5iy62rrttmf6tnvlpo4y', u'method_premium': u'1', u'down_direct': u'1', u'referer': u'http://uptobox.com/d507fg2b4w9b', u'method_free': '', u'id': u'd507fg2b4w9b', u'op': u'download2'}
04.09.2013 23:39:21 WARNING   Download failed: Zone-Telechargement.comNCIS.S10E14.FRENCH.LD.HDTV.XviD-MiND.avi | 'Parse error (DIRECT LINK) - plugin may be out of date'
Traceback (most recent call last):
File "/usr/local/share/pyload/module/PluginThread.py", line 187, in run
pyfile.plugin.preprocessing(self)
File "/usr/local/share/pyload/module/plugins/Plugin.py", line 237, in preprocessing
return self.process(self.pyfile)
File "/root/pyload/userplugins/hoster/XFileSharingPro.py", line 95, in process
self.handlePremium()
File "/root/pyload/userplugins/hoster/XFileSharingPro.py", line 160, in handlePremium
self.parseError('DIRECT LINK')
File "/root/pyload/userplugins/internal/SimpleHoster.py", line 226, in parseError
raise PluginParseError(msg)
PluginParseError: 'Parse error (DIRECT LINK) - plugin may be out of date'
04.09.2013 23:39:21 INFO      Debug Report written to debug_UptoboxCom_04-09-2013_23-39-21.zip
04.09.2013 23:39:21 INFO      UnSkipOnFail: look for skipped duplicates for Zone-Telechargement.comNCIS.S10E14.FRENCH.LD.HDTV.XviD-MiND.avi (pid:4)...
04.09.2013 23:39:21 DEBUG     All downloads processed
..
..
..
04.09.2013 23:51:53 WARNING   Download failed: http://uptobox.com/d507fg2b4w9b | 'Parse error (DIRECT LINK) - plugin may be out of date'
Traceback (most recent call last):
File "/usr/local/share/pyload/module/PluginThread.py", line 187, in run
pyfile.plugin.preprocessing(self)
File "/usr/local/share/pyload/module/plugins/Plugin.py", line 237, in preprocessing
return self.process(self.pyfile)
File "/root/pyload/userplugins/hoster/XFileSharingPro.py", line 95, in process
self.handlePremium()
File "/root/pyload/userplugins/hoster/XFileSharingPro.py", line 160, in handlePremium
self.parseError('DIRECT LINK')
File "/root/pyload/userplugins/internal/SimpleHoster.py", line 226, in parseError
raise PluginParseError(msg)
PluginParseError: 'Parse error (DIRECT LINK) - plugin may be out of date'
04.09.2013 23:51:53 INFO      Debug Report written to debug_UptoboxCom_04-09-2013_23-51-53.zip
04.09.2013 23:51:53 INFO      UnSkipOnFail: look for skipped duplicates for d507fg2b4w9b (pid:4)...
04.09.2013 23:51:53 DEBUG     All downloads processed
04.09.2013 23:52:24 DEBUG     Run Info Fetching for UptoboxCom
04.09.2013 23:52:24 INFO      Added package ncis containing 1 links
04.09.2013 23:52:24 DEBUG     Finished Info Fetching for UptoboxCom
04.09.2013 23:52:25 INFO      Download starts: Zone-Telechargement.comNCIS.S10E14.FRENCH.LD.HDTV.XviD-MiND.avi
04.09.2013 23:52:25 DEBUG     UptoboxCom: URL: http://uptobox.com/d507fg2b4w9b
04.09.2013 23:52:25 DEBUG     UptoboxCom: {'status': 3, 'name': '', 'size': 0}
04.09.2013 23:52:25 DEBUG     UptoboxCom: uptobox.com | {u'rand': u'tisa6omstximt6fbfdyde7hp23iwxqsqnmymbly', u'method_premium': u'1', u'down_direct': u'1', u'referer': u'http://uptobox.com/d507fg2b4w9b', u'method_free': '', u'id': u'd507fg2b4w9b', u'op': u'download2'}
04.09.2013 23:52:26 DEBUG     UptoboxCom: DIRECT LINK: http://www5.uptobox.com:8080/d/uyyyv54jf4csmtsqkbyzmw3heem4lbpapk2uxggvw5e4lpffsqpijogg/Zone-Telechargement.comNCIS.S10E14.FRENCH.LD.HDTV.XviD-MiND.avi

# Fixed code
def prepare(self):
    """Initialize important variables"""
    if not hasattr(self, "HOSTER_NAME"):
        self.HOSTER_NAME = re.search(self.__pattern__, self.pyfile.url).group(1)
    if not hasattr(self, "DIRECT_LINK_PATTERN"):
        self.DIRECT_LINK_PATTERN = (
            r'(http://([^/]*?%s|\d+\.\d+\.\d+\.\d+)(:\d+/d/|(?:/files)?/\d+/\w+/)[^"\'<]+)'
            % self.HOSTER_NAME
        )

    self.captcha = self.errmsg = None
    self.passwords = self.getPassword().splitlines()