We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
FourChanOrg don't work
When i try to download a thread (e.g. http://boards.4chan.org/wg/res/5176429) nothing happens, only BasePlugin will be used,


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `module/plugins/crypter/FourChanOrg.py`
Content:
```
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 import re
5 
6 from module.plugins.Crypter import Crypter
7 
8 class FourChanOrg(Crypter):
9     __name__ = "FourChanOrg"
10     __type__ = "container"
11     __pattern__ = r"http://(www\.)?(img\.)?(zip\.)?4chan.org/\w+/(res/|imgboard\.html)"
12     __version__ = "0.1"
13     __description__ = """4chan.org Thread Download Plugin"""
14     __author_name__ = ("Spoob")
15     __author_mail__ = ("Spoob@pyload.org")
16 
17     def __init__(self, parent):
18         Crypter.__init__(self, parent)
19         self.parent = parent
20         self.html = None
21 
22     def file_exists(self):
23         """ returns True or False
24         """
25         return True
26 
27     def proceed(self, url, location):
28         url = self.parent.url
29         html = self.req.load(url)
30         link_pattern = ""
31         temp_links = []
32         if "imagebord.html" in url:
33             link_pattern = '[<a href="(res/\d*\.html)">Reply</a>]'
34             temp_links = re.findall(link_pattern, html)
35             for link in re.findall(link_pattern, html):
36                 temp_links.append(link)
37         else:
38             temp_links = re.findall('File : <a href="(http://(?:img\.)?(?:zip\.)?4chan\.org/\w{,3}/src/\d*\..{3})"', html)
39         self.links = temp_links
40
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py
--- a/module/plugins/crypter/FourChanOrg.py
+++ b/module/plugins/crypter/FourChanOrg.py
@@ -6,34 +6,20 @@
 from module.plugins.Crypter import Crypter
 
 class FourChanOrg(Crypter):
+    # Based on 4chandl by Roland Beermann
+    # https://gist.github.com/enkore/3492599
     __name__ = "FourChanOrg"
     __type__ = "container"
-    __pattern__ = r"http://(www\.)?(img\.)?(zip\.)?4chan.org/\w+/(res/|imgboard\.html)"
-    __version__ = "0.1"
-    __description__ = """4chan.org Thread Download Plugin"""
-    __author_name__ = ("Spoob")
-    __author_mail__ = ("Spoob@pyload.org")
+    __version__ = "0.3"
+    __pattern__ = r"http://boards\.4chan.org/\w+/res/(\d+)"
+    __description__ = "Downloader for entire 4chan threads"
 
-    def __init__(self, parent):
-        Crypter.__init__(self, parent)
-        self.parent = parent
-        self.html = None
+    def decrypt(self, pyfile):
+        pagehtml = self.load(pyfile.url)
 
-    def file_exists(self):
-        """ returns True or False
-        """
-        return True
+        images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]*)', pagehtml))
+        urls = []
+        for image in images:
+            urls.append("http://" + image)
 
-    def proceed(self, url, location):
-        url = self.parent.url
-        html = self.req.load(url)
-        link_pattern = ""
-        temp_links = []
-        if "imagebord.html" in url:
-            link_pattern = '[<a href="(res/\d*\.html)">Reply</a>]'
-            temp_links = re.findall(link_pattern, html)
-            for link in re.findall(link_pattern, html):
-                temp_links.append(link)
-        else:
-            temp_links = re.findall('File : <a href="(http://(?:img\.)?(?:zip\.)?4chan\.org/\w{,3}/src/\d*\..{3})"', html)
-        self.links = temp_links
+        self.core.files.addLinks(urls, self.pyfile.package().id)

{"golden_diff": "diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py\n--- a/module/plugins/crypter/FourChanOrg.py\n+++ b/module/plugins/crypter/FourChanOrg.py\n@@ -6,34 +6,20 @@\n from module.plugins.Crypter import Crypter\n \n class FourChanOrg(Crypter):\n+    # Based on 4chandl by Roland Beermann\n+    # https://gist.github.com/enkore/3492599\n     __name__ = \"FourChanOrg\"\n     __type__ = \"container\"\n-    __pattern__ = r\"http://(www\\.)?(img\\.)?(zip\\.)?4chan.org/\\w+/(res/|imgboard\\.html)\"\n-    __version__ = \"0.1\"\n-    __description__ = \"\"\"4chan.org Thread Download Plugin\"\"\"\n-    __author_name__ = (\"Spoob\")\n-    __author_mail__ = (\"Spoob@pyload.org\")\n+    __version__ = \"0.3\"\n+    __pattern__ = r\"http://boards\\.4chan.org/\\w+/res/(\\d+)\"\n+    __description__ = \"Downloader for entire 4chan threads\"\n \n-    def __init__(self, parent):\n-        Crypter.__init__(self, parent)\n-        self.parent = parent\n-        self.html = None\n+    def decrypt(self, pyfile):\n+        pagehtml = self.load(pyfile.url)\n \n-    def file_exists(self):\n-        \"\"\" returns True or False\n-        \"\"\"\n-        return True\n+        images = set(re.findall(r'(images\\.4chan\\.org/[^/]*/src/[^\"<]*)', pagehtml))\n+        urls = []\n+        for image in images:\n+            urls.append(\"http://\" + image)\n \n-    def proceed(self, url, location):\n-        url = self.parent.url\n-        html = self.req.load(url)\n-        link_pattern = \"\"\n-        temp_links = []\n-        if \"imagebord.html\" in url:\n-            link_pattern = '[<a href=\"(res/\\d*\\.html)\">Reply</a>]'\n-            temp_links = re.findall(link_pattern, html)\n-            for link in re.findall(link_pattern, html):\n-                temp_links.append(link)\n-        else:\n-            temp_links = re.findall('File : <a href=\"(http://(?:img\\.)?(?:zip\\.)?4chan\\.org/\\w{,3}/src/\\d*\\..{3})\"', html)\n-        self.links = temp_links\n+        self.core.files.addLinks(urls, self.pyfile.package().id)\n", "issue": "FourChanOrg don't work\nWhen i try to download a thread (e.g. http://boards.4chan.org/wg/res/5176429) nothing happens, only BasePlugin will be used,\n\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\n\nfrom module.plugins.Crypter import Crypter\n\nclass FourChanOrg(Crypter):\n    __name__ = \"FourChanOrg\"\n    __type__ = \"container\"\n    __pattern__ = r\"http://(www\\.)?(img\\.)?(zip\\.)?4chan.org/\\w+/(res/|imgboard\\.html)\"\n    __version__ = \"0.1\"\n    __description__ = \"\"\"4chan.org Thread Download Plugin\"\"\"\n    __author_name__ = (\"Spoob\")\n    __author_mail__ = (\"Spoob@pyload.org\")\n\n    def __init__(self, parent):\n        Crypter.__init__(self, parent)\n        self.parent = parent\n        self.html = None\n\n    def file_exists(self):\n        \"\"\" returns True or False\n        \"\"\"\n        return True\n\n    def proceed(self, url, location):\n        url = self.parent.url\n        html = self.req.load(url)\n        link_pattern = \"\"\n        temp_links = []\n        if \"imagebord.html\" in url:\n            link_pattern = '[<a href=\"(res/\\d*\\.html)\">Reply</a>]'\n            temp_links = re.findall(link_pattern, html)\n            for link in re.findall(link_pattern, html):\n                temp_links.append(link)\n        else:\n            temp_links = re.findall('File : <a href=\"(http://(?:img\\.)?(?:zip\\.)?4chan\\.org/\\w{,3}/src/\\d*\\..{3})\"', html)\n        self.links = temp_links\n", "path": "module/plugins/crypter/FourChanOrg.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\n\nfrom module.plugins.Crypter import Crypter\n\nclass FourChanOrg(Crypter):\n    # Based on 4chandl by Roland Beermann\n    # https://gist.github.com/enkore/3492599\n    __name__ = \"FourChanOrg\"\n    __type__ = \"container\"\n    __version__ = \"0.3\"\n    __pattern__ = r\"http://boards\\.4chan.org/\\w+/res/(\\d+)\"\n    __description__ = \"Downloader for entire 4chan threads\"\n\n    def decrypt(self, pyfile):\n        pagehtml = self.load(pyfile.url)\n\n        images = set(re.findall(r'(images\\.4chan\\.org/[^/]*/src/[^\"<]*)', pagehtml))\n        urls = []\n        for image in images:\n            urls.append(\"http://\" + image)\n\n        self.core.files.addLinks(urls, self.pyfile.package().id)\n", "path": "module/plugins/crypter/FourChanOrg.py"}]}