We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bakabt URL change
Bakabt url has change from http://www.bakabt.com to https://bakabt.me, the url rewriter plugin needs to be updated to match

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `flexget/plugins/sites/bakabt.py`
Content:
```
1 from __future__ import unicode_literals, division, absolute_import
2 from builtins import *  # noqa pylint: disable=unused-import, redefined-builtin
3 
4 import logging
5 
6 from flexget import plugin
7 from flexget.event import event
8 from flexget.plugins.internal.urlrewriting import UrlRewritingError
9 from flexget.utils.soup import get_soup
10 
11 log = logging.getLogger('bakabt')
12 
13 
14 class UrlRewriteBakaBT(object):
15     """BakaBT urlrewriter."""
16 
17     # urlrewriter API
18     def url_rewritable(self, task, entry):
19         url = entry['url']
20         if url.startswith('http://www.bakabt.com/download/'):
21             return False
22         if url.startswith('http://www.bakabt.com/') or url.startswith('http://bakabt.com/'):
23             return True
24         return False
25 
26     # urlrewriter API
27     def url_rewrite(self, task, entry):
28         entry['url'] = self.parse_download_page(entry['url'], task.requests)
29 
30     @plugin.internet(log)
31     def parse_download_page(self, url, requests):
32         txheaders = {'User-agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
33         page = requests.get(url, headers=txheaders)
34         try:
35             soup = get_soup(page.text)
36         except Exception as e:
37             raise UrlRewritingError(e)
38         tag_a = soup.find('a', attrs={'class': 'download_link'})
39         if not tag_a:
40             raise UrlRewritingError('Unable to locate download link from url %s' % url)
41         torrent_url = 'http://www.bakabt.com' + tag_a.get('href')
42         return torrent_url
43 
44 
45 @event('plugin.register')
46 def register_plugin():
47     plugin.register(UrlRewriteBakaBT, 'bakabt', groups=['urlrewriter'], api_ver=2)
48
```
--- 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/flexget/plugins/sites/bakabt.py b/flexget/plugins/sites/bakabt.py
--- a/flexget/plugins/sites/bakabt.py
+++ b/flexget/plugins/sites/bakabt.py
@@ -17,9 +17,9 @@
     # urlrewriter API
     def url_rewritable(self, task, entry):
         url = entry['url']
-        if url.startswith('http://www.bakabt.com/download/'):
+        if url.startswith('http://www.bakabt.me/download/'):
             return False
-        if url.startswith('http://www.bakabt.com/') or url.startswith('http://bakabt.com/'):
+        if url.startswith('http://www.bakabt.me/') or url.startswith('http://bakabt.me/'):
             return True
         return False
 
@@ -38,7 +38,7 @@
         tag_a = soup.find('a', attrs={'class': 'download_link'})
         if not tag_a:
             raise UrlRewritingError('Unable to locate download link from url %s' % url)
-        torrent_url = 'http://www.bakabt.com' + tag_a.get('href')
+        torrent_url = 'http://www.bakabt.me' + tag_a.get('href')
         return torrent_url

{"golden_diff": "diff --git a/flexget/plugins/sites/bakabt.py b/flexget/plugins/sites/bakabt.py\n--- a/flexget/plugins/sites/bakabt.py\n+++ b/flexget/plugins/sites/bakabt.py\n@@ -17,9 +17,9 @@\n     # urlrewriter API\n     def url_rewritable(self, task, entry):\n         url = entry['url']\n-        if url.startswith('http://www.bakabt.com/download/'):\n+        if url.startswith('http://www.bakabt.me/download/'):\n             return False\n-        if url.startswith('http://www.bakabt.com/') or url.startswith('http://bakabt.com/'):\n+        if url.startswith('http://www.bakabt.me/') or url.startswith('http://bakabt.me/'):\n             return True\n         return False\n \n@@ -38,7 +38,7 @@\n         tag_a = soup.find('a', attrs={'class': 'download_link'})\n         if not tag_a:\n             raise UrlRewritingError('Unable to locate download link from url %s' % url)\n-        torrent_url = 'http://www.bakabt.com' + tag_a.get('href')\n+        torrent_url = 'http://www.bakabt.me' + tag_a.get('href')\n         return torrent_url\n", "issue": "Bakabt URL change\nBakabt url has change from http://www.bakabt.com to https://bakabt.me, the url rewriter plugin needs to be updated to match\n", "before_files": [{"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import *  # noqa pylint: disable=unused-import, redefined-builtin\n\nimport logging\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom flexget.plugins.internal.urlrewriting import UrlRewritingError\nfrom flexget.utils.soup import get_soup\n\nlog = logging.getLogger('bakabt')\n\n\nclass UrlRewriteBakaBT(object):\n    \"\"\"BakaBT urlrewriter.\"\"\"\n\n    # urlrewriter API\n    def url_rewritable(self, task, entry):\n        url = entry['url']\n        if url.startswith('http://www.bakabt.com/download/'):\n            return False\n        if url.startswith('http://www.bakabt.com/') or url.startswith('http://bakabt.com/'):\n            return True\n        return False\n\n    # urlrewriter API\n    def url_rewrite(self, task, entry):\n        entry['url'] = self.parse_download_page(entry['url'], task.requests)\n\n    @plugin.internet(log)\n    def parse_download_page(self, url, requests):\n        txheaders = {'User-agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}\n        page = requests.get(url, headers=txheaders)\n        try:\n            soup = get_soup(page.text)\n        except Exception as e:\n            raise UrlRewritingError(e)\n        tag_a = soup.find('a', attrs={'class': 'download_link'})\n        if not tag_a:\n            raise UrlRewritingError('Unable to locate download link from url %s' % url)\n        torrent_url = 'http://www.bakabt.com' + tag_a.get('href')\n        return torrent_url\n\n\n@event('plugin.register')\ndef register_plugin():\n    plugin.register(UrlRewriteBakaBT, 'bakabt', groups=['urlrewriter'], api_ver=2)\n", "path": "flexget/plugins/sites/bakabt.py"}], "after_files": [{"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import *  # noqa pylint: disable=unused-import, redefined-builtin\n\nimport logging\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom flexget.plugins.internal.urlrewriting import UrlRewritingError\nfrom flexget.utils.soup import get_soup\n\nlog = logging.getLogger('bakabt')\n\n\nclass UrlRewriteBakaBT(object):\n    \"\"\"BakaBT urlrewriter.\"\"\"\n\n    # urlrewriter API\n    def url_rewritable(self, task, entry):\n        url = entry['url']\n        if url.startswith('http://www.bakabt.me/download/'):\n            return False\n        if url.startswith('http://www.bakabt.me/') or url.startswith('http://bakabt.me/'):\n            return True\n        return False\n\n    # urlrewriter API\n    def url_rewrite(self, task, entry):\n        entry['url'] = self.parse_download_page(entry['url'], task.requests)\n\n    @plugin.internet(log)\n    def parse_download_page(self, url, requests):\n        txheaders = {'User-agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}\n        page = requests.get(url, headers=txheaders)\n        try:\n            soup = get_soup(page.text)\n        except Exception as e:\n            raise UrlRewritingError(e)\n        tag_a = soup.find('a', attrs={'class': 'download_link'})\n        if not tag_a:\n            raise UrlRewritingError('Unable to locate download link from url %s' % url)\n        torrent_url = 'http://www.bakabt.me' + tag_a.get('href')\n        return torrent_url\n\n\n@event('plugin.register')\ndef register_plugin():\n    plugin.register(UrlRewriteBakaBT, 'bakabt', groups=['urlrewriter'], api_ver=2)\n", "path": "flexget/plugins/sites/bakabt.py"}]}