prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  ExPASy.sprot_search_ful and ExPASy.sprot_search_de do not work
  Both will return just pages stating "Please update your links/bookmarks" and eventually correct link at the end of page.
  The functions use http://www.expasy.ch/cgi-bin/sprot-search-ful or http://www.expasy.ch/cgi-bin/sprot-search-de eventually, which pages do not exist anymore.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `Bio/ExPASy/__init__.py`
  Content:
  ```
  1 # Copyright 2000 by Jeffrey Chang.  All rights reserved.
  2 # This code is part of the Biopython distribution and governed by its
  3 # license.  Please see the LICENSE file that should have been included
  4 # as part of this package.
  5 
  6 """Code to access resources at ExPASy over the WWW.
  7 
  8 See https://www.expasy.org/
  9 
  10 
  11 Functions:
  12  - get_prodoc_entry  Interface to the get-prodoc-entry CGI script.
  13  - get_prosite_entry Interface to the get-prosite-entry CGI script.
  14  - get_prosite_raw   Interface to the get-prosite-raw CGI script.
  15  - get_sprot_raw     Interface to the get-sprot-raw CGI script.
  16  - sprot_search_ful  Interface to the sprot-search-ful CGI script.
  17  - sprot_search_de   Interface to the sprot-search-de CGI script.
  18 
  19 """
  20 
  21 # Importing these functions with leading underscore as not intended for reuse
  22 from Bio._py3k import urlopen as _urlopen
  23 from Bio._py3k import urlencode as _urlencode
  24 from Bio._py3k import _binary_to_string_handle
  25 
  26 
  27 def get_prodoc_entry(id,
  28                      cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prodoc-entry'):
  29     """Get a text handle to a PRODOC entry at ExPASy in HTML format.
  30 
  31     >>> from Bio import ExPASy
  32     >>> with ExPASy.get_prodoc_entry('PDOC00001') as in_handle:
  33     ...     html = in_handle.read()
  34     ...
  35     >>> with open("myprodocrecord.html", "w") as out_handle:
  36     ...     out_handle.write(html)
  37     ...
  38 
  39     For a non-existing key XXX, ExPASy returns an HTML-formatted page
  40     containing this text: 'There is currently no PROSITE entry for'
  41     """
  42     return _binary_to_string_handle(_urlopen("%s?%s" % (cgi, id)))
  43 
  44 
  45 def get_prosite_entry(id,
  46                       cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prosite-entry'):
  47     """Get a text handle to a PROSITE entry at ExPASy in HTML format.
  48 
  49     >>> from Bio import ExPASy
  50     >>> with ExPASy.get_prosite_entry('PS00001') as in_handle:
  51     ...     html = in_handle.read()
  52     ...
  53     >>> with open("myprositerecord.html", "w") as out_handle:
  54     ...     out_handle.write(html)
  55     ...
  56 
  57     For a non-existing key XXX, ExPASy returns an HTML-formatted page
  58     containing this text: 'There is currently no PROSITE entry for'
  59     """
  60     return _binary_to_string_handle(_urlopen("%s?%s" % (cgi, id)))
  61 
  62 
  63 def get_prosite_raw(id, cgi=None):
  64     """Get a text handle to a raw PROSITE or PRODOC record at ExPASy.
  65 
  66     The cgi argument is deprecated due to changes in the ExPASy
  67     website.
  68 
  69     For a non-existing key, ExPASy returns nothing.
  70 
  71     >>> from Bio import ExPASy
  72     >>> from Bio.ExPASy import Prosite
  73     >>> with ExPASy.get_prosite_raw('PS00001') as handle:
  74     ...    record = Prosite.read(handle)
  75     ...
  76     >>> print(record.accession)
  77     PS00001
  78 
  79 
  80     For a non-existing key, ExPASy returns an error:
  81 
  82     >>> handle = get_prosite_raw("does_not_exist")
  83     Traceback (most recent call last):
  84     ...
  85     urllib.error.HTTPError: HTTP Error 404: Not Found
  86 
  87     """
  88     url = "https://prosite.expasy.org/%s.txt" % id
  89     return _binary_to_string_handle(_urlopen(url))
  90 
  91 
  92 def get_sprot_raw(id):
  93     """Get a text handle to a raw SwissProt entry at ExPASy.
  94 
  95     For an ID of XXX, fetches http://www.uniprot.org/uniprot/XXX.txt
  96     (as per the https://www.expasy.org/expasy_urls.html documentation).
  97 
  98     >>> from Bio import ExPASy
  99     >>> from Bio import SwissProt
  100     >>> with ExPASy.get_sprot_raw("O23729") as handle:
  101     ...     record = SwissProt.read(handle)
  102     ...
  103     >>> print(record.entry_name)
  104     CHS3_BROFI
  105 
  106     For a non-existing identifier, UniProt returns an error:
  107 
  108     >>> ExPASy.get_sprot_raw("DOES_NOT_EXIST")
  109     Traceback (most recent call last):
  110     ...
  111     urllib.error.HTTPError: HTTP Error 404: Not Found
  112 
  113     """
  114     url = "http://www.uniprot.org/uniprot/%s.txt" % id
  115     return _binary_to_string_handle(_urlopen(url))
  116 
  117 
  118 def sprot_search_ful(text, make_wild=None, swissprot=1, trembl=None,
  119                      cgi='https://www.expasy.org/cgi-bin/sprot-search-ful'):
  120     """Search SwissProt by full text (BROKEN)."""
  121     variables = {'SEARCH': text}
  122     if make_wild:
  123         variables['makeWild'] = 'on'
  124     if swissprot:
  125         variables['S'] = 'on'
  126     if trembl:
  127         variables['T'] = 'on'
  128     options = _urlencode(variables)
  129     fullcgi = "%s?%s" % (cgi, options)
  130     handle = _binary_to_string_handle(_urlopen(fullcgi))
  131     return handle
  132 
  133 
  134 def sprot_search_de(text, swissprot=1, trembl=None,
  135                     cgi='https://www.expasy.org/cgi-bin/sprot-search-de'):
  136     """Search SwissProt (BROKEN).
  137 
  138     Search by name, description, gene name, species, or organelle.
  139     """
  140     variables = {'SEARCH': text}
  141     if swissprot:
  142         variables['S'] = 'on'
  143     if trembl:
  144         variables['T'] = 'on'
  145     options = _urlencode(variables)
  146     fullcgi = "%s?%s" % (cgi, options)
  147     return _binary_to_string_handle(_urlopen(fullcgi))
  148
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/Bio/ExPASy/__init__.py b/Bio/ExPASy/__init__.py
  --- a/Bio/ExPASy/__init__.py
  +++ b/Bio/ExPASy/__init__.py
  @@ -13,8 +13,6 @@
    - get_prosite_entry Interface to the get-prosite-entry CGI script.
    - get_prosite_raw   Interface to the get-prosite-raw CGI script.
    - get_sprot_raw     Interface to the get-sprot-raw CGI script.
  - - sprot_search_ful  Interface to the sprot-search-ful CGI script.
  - - sprot_search_de   Interface to the sprot-search-de CGI script.
   
   """
   
  @@ -113,35 +111,3 @@
       """
       url = "http://www.uniprot.org/uniprot/%s.txt" % id
       return _binary_to_string_handle(_urlopen(url))
  -
  -
  -def sprot_search_ful(text, make_wild=None, swissprot=1, trembl=None,
  -                     cgi='https://www.expasy.org/cgi-bin/sprot-search-ful'):
  -    """Search SwissProt by full text (BROKEN)."""
  -    variables = {'SEARCH': text}
  -    if make_wild:
  -        variables['makeWild'] = 'on'
  -    if swissprot:
  -        variables['S'] = 'on'
  -    if trembl:
  -        variables['T'] = 'on'
  -    options = _urlencode(variables)
  -    fullcgi = "%s?%s" % (cgi, options)
  -    handle = _binary_to_string_handle(_urlopen(fullcgi))
  -    return handle
  -
  -
  -def sprot_search_de(text, swissprot=1, trembl=None,
  -                    cgi='https://www.expasy.org/cgi-bin/sprot-search-de'):
  -    """Search SwissProt (BROKEN).
  -
  -    Search by name, description, gene name, species, or organelle.
  -    """
  -    variables = {'SEARCH': text}
  -    if swissprot:
  -        variables['S'] = 'on'
  -    if trembl:
  -        variables['T'] = 'on'
  -    options = _urlencode(variables)
  -    fullcgi = "%s?%s" % (cgi, options)
  -    return _binary_to_string_handle(_urlopen(fullcgi))
  
verification_info: {"golden_diff": "diff --git a/Bio/ExPASy/__init__.py b/Bio/ExPASy/__init__.py\n--- a/Bio/ExPASy/__init__.py\n+++ b/Bio/ExPASy/__init__.py\n@@ -13,8 +13,6 @@\n  - get_prosite_entry Interface to the get-prosite-entry CGI script.\n  - get_prosite_raw   Interface to the get-prosite-raw CGI script.\n  - get_sprot_raw     Interface to the get-sprot-raw CGI script.\n- - sprot_search_ful  Interface to the sprot-search-ful CGI script.\n- - sprot_search_de   Interface to the sprot-search-de CGI script.\n \n \"\"\"\n \n@@ -113,35 +111,3 @@\n     \"\"\"\n     url = \"http://www.uniprot.org/uniprot/%s.txt\" % id\n     return _binary_to_string_handle(_urlopen(url))\n-\n-\n-def sprot_search_ful(text, make_wild=None, swissprot=1, trembl=None,\n-                     cgi='https://www.expasy.org/cgi-bin/sprot-search-ful'):\n-    \"\"\"Search SwissProt by full text (BROKEN).\"\"\"\n-    variables = {'SEARCH': text}\n-    if make_wild:\n-        variables['makeWild'] = 'on'\n-    if swissprot:\n-        variables['S'] = 'on'\n-    if trembl:\n-        variables['T'] = 'on'\n-    options = _urlencode(variables)\n-    fullcgi = \"%s?%s\" % (cgi, options)\n-    handle = _binary_to_string_handle(_urlopen(fullcgi))\n-    return handle\n-\n-\n-def sprot_search_de(text, swissprot=1, trembl=None,\n-                    cgi='https://www.expasy.org/cgi-bin/sprot-search-de'):\n-    \"\"\"Search SwissProt (BROKEN).\n-\n-    Search by name, description, gene name, species, or organelle.\n-    \"\"\"\n-    variables = {'SEARCH': text}\n-    if swissprot:\n-        variables['S'] = 'on'\n-    if trembl:\n-        variables['T'] = 'on'\n-    options = _urlencode(variables)\n-    fullcgi = \"%s?%s\" % (cgi, options)\n-    return _binary_to_string_handle(_urlopen(fullcgi))\n", "issue": "ExPASy.sprot_search_ful and ExPASy.sprot_search_de do not work\nBoth will return just pages stating \"Please update your links/bookmarks\" and eventually correct link at the end of page.\nThe functions use http://www.expasy.ch/cgi-bin/sprot-search-ful or http://www.expasy.ch/cgi-bin/sprot-search-de eventually, which pages do not exist anymore.\n\n", "before_files": [{"content": "# Copyright 2000 by Jeffrey Chang.  All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license.  Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"Code to access resources at ExPASy over the WWW.\n\nSee https://www.expasy.org/\n\n\nFunctions:\n - get_prodoc_entry  Interface to the get-prodoc-entry CGI script.\n - get_prosite_entry Interface to the get-prosite-entry CGI script.\n - get_prosite_raw   Interface to the get-prosite-raw CGI script.\n - get_sprot_raw     Interface to the get-sprot-raw CGI script.\n - sprot_search_ful  Interface to the sprot-search-ful CGI script.\n - sprot_search_de   Interface to the sprot-search-de CGI script.\n\n\"\"\"\n\n# Importing these functions with leading underscore as not intended for reuse\nfrom Bio._py3k import urlopen as _urlopen\nfrom Bio._py3k import urlencode as _urlencode\nfrom Bio._py3k import _binary_to_string_handle\n\n\ndef get_prodoc_entry(id,\n                     cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prodoc-entry'):\n    \"\"\"Get a text handle to a PRODOC entry at ExPASy in HTML format.\n\n    >>> from Bio import ExPASy\n    >>> with ExPASy.get_prodoc_entry('PDOC00001') as in_handle:\n    ...     html = in_handle.read()\n    ...\n    >>> with open(\"myprodocrecord.html\", \"w\") as out_handle:\n    ...     out_handle.write(html)\n    ...\n\n    For a non-existing key XXX, ExPASy returns an HTML-formatted page\n    containing this text: 'There is currently no PROSITE entry for'\n    \"\"\"\n    return _binary_to_string_handle(_urlopen(\"%s?%s\" % (cgi, id)))\n\n\ndef get_prosite_entry(id,\n                      cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prosite-entry'):\n    \"\"\"Get a text handle to a PROSITE entry at ExPASy in HTML format.\n\n    >>> from Bio import ExPASy\n    >>> with ExPASy.get_prosite_entry('PS00001') as in_handle:\n    ...     html = in_handle.read()\n    ...\n    >>> with open(\"myprositerecord.html\", \"w\") as out_handle:\n    ...     out_handle.write(html)\n    ...\n\n    For a non-existing key XXX, ExPASy returns an HTML-formatted page\n    containing this text: 'There is currently no PROSITE entry for'\n    \"\"\"\n    return _binary_to_string_handle(_urlopen(\"%s?%s\" % (cgi, id)))\n\n\ndef get_prosite_raw(id, cgi=None):\n    \"\"\"Get a text handle to a raw PROSITE or PRODOC record at ExPASy.\n\n    The cgi argument is deprecated due to changes in the ExPASy\n    website.\n\n    For a non-existing key, ExPASy returns nothing.\n\n    >>> from Bio import ExPASy\n    >>> from Bio.ExPASy import Prosite\n    >>> with ExPASy.get_prosite_raw('PS00001') as handle:\n    ...    record = Prosite.read(handle)\n    ...\n    >>> print(record.accession)\n    PS00001\n\n\n    For a non-existing key, ExPASy returns an error:\n\n    >>> handle = get_prosite_raw(\"does_not_exist\")\n    Traceback (most recent call last):\n    ...\n    urllib.error.HTTPError: HTTP Error 404: Not Found\n\n    \"\"\"\n    url = \"https://prosite.expasy.org/%s.txt\" % id\n    return _binary_to_string_handle(_urlopen(url))\n\n\ndef get_sprot_raw(id):\n    \"\"\"Get a text handle to a raw SwissProt entry at ExPASy.\n\n    For an ID of XXX, fetches http://www.uniprot.org/uniprot/XXX.txt\n    (as per the https://www.expasy.org/expasy_urls.html documentation).\n\n    >>> from Bio import ExPASy\n    >>> from Bio import SwissProt\n    >>> with ExPASy.get_sprot_raw(\"O23729\") as handle:\n    ...     record = SwissProt.read(handle)\n    ...\n    >>> print(record.entry_name)\n    CHS3_BROFI\n\n    For a non-existing identifier, UniProt returns an error:\n\n    >>> ExPASy.get_sprot_raw(\"DOES_NOT_EXIST\")\n    Traceback (most recent call last):\n    ...\n    urllib.error.HTTPError: HTTP Error 404: Not Found\n\n    \"\"\"\n    url = \"http://www.uniprot.org/uniprot/%s.txt\" % id\n    return _binary_to_string_handle(_urlopen(url))\n\n\ndef sprot_search_ful(text, make_wild=None, swissprot=1, trembl=None,\n                     cgi='https://www.expasy.org/cgi-bin/sprot-search-ful'):\n    \"\"\"Search SwissProt by full text (BROKEN).\"\"\"\n    variables = {'SEARCH': text}\n    if make_wild:\n        variables['makeWild'] = 'on'\n    if swissprot:\n        variables['S'] = 'on'\n    if trembl:\n        variables['T'] = 'on'\n    options = _urlencode(variables)\n    fullcgi = \"%s?%s\" % (cgi, options)\n    handle = _binary_to_string_handle(_urlopen(fullcgi))\n    return handle\n\n\ndef sprot_search_de(text, swissprot=1, trembl=None,\n                    cgi='https://www.expasy.org/cgi-bin/sprot-search-de'):\n    \"\"\"Search SwissProt (BROKEN).\n\n    Search by name, description, gene name, species, or organelle.\n    \"\"\"\n    variables = {'SEARCH': text}\n    if swissprot:\n        variables['S'] = 'on'\n    if trembl:\n        variables['T'] = 'on'\n    options = _urlencode(variables)\n    fullcgi = \"%s?%s\" % (cgi, options)\n    return _binary_to_string_handle(_urlopen(fullcgi))\n", "path": "Bio/ExPASy/__init__.py"}], "after_files": [{"content": "# Copyright 2000 by Jeffrey Chang.  All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license.  Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"Code to access resources at ExPASy over the WWW.\n\nSee https://www.expasy.org/\n\n\nFunctions:\n - get_prodoc_entry  Interface to the get-prodoc-entry CGI script.\n - get_prosite_entry Interface to the get-prosite-entry CGI script.\n - get_prosite_raw   Interface to the get-prosite-raw CGI script.\n - get_sprot_raw     Interface to the get-sprot-raw CGI script.\n\n\"\"\"\n\n# Importing these functions with leading underscore as not intended for reuse\nfrom Bio._py3k import urlopen as _urlopen\nfrom Bio._py3k import urlencode as _urlencode\nfrom Bio._py3k import _binary_to_string_handle\n\n\ndef get_prodoc_entry(id,\n                     cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prodoc-entry'):\n    \"\"\"Get a text handle to a PRODOC entry at ExPASy in HTML format.\n\n    >>> from Bio import ExPASy\n    >>> with ExPASy.get_prodoc_entry('PDOC00001') as in_handle:\n    ...     html = in_handle.read()\n    ...\n    >>> with open(\"myprodocrecord.html\", \"w\") as out_handle:\n    ...     out_handle.write(html)\n    ...\n\n    For a non-existing key XXX, ExPASy returns an HTML-formatted page\n    containing this text: 'There is currently no PROSITE entry for'\n    \"\"\"\n    return _binary_to_string_handle(_urlopen(\"%s?%s\" % (cgi, id)))\n\n\ndef get_prosite_entry(id,\n                      cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prosite-entry'):\n    \"\"\"Get a text handle to a PROSITE entry at ExPASy in HTML format.\n\n    >>> from Bio import ExPASy\n    >>> with ExPASy.get_prosite_entry('PS00001') as in_handle:\n    ...     html = in_handle.read()\n    ...\n    >>> with open(\"myprositerecord.html\", \"w\") as out_handle:\n    ...     out_handle.write(html)\n    ...\n\n    For a non-existing key XXX, ExPASy returns an HTML-formatted page\n    containing this text: 'There is currently no PROSITE entry for'\n    \"\"\"\n    return _binary_to_string_handle(_urlopen(\"%s?%s\" % (cgi, id)))\n\n\ndef get_prosite_raw(id, cgi=None):\n    \"\"\"Get a text handle to a raw PROSITE or PRODOC record at ExPASy.\n\n    The cgi argument is deprecated due to changes in the ExPASy\n    website.\n\n    For a non-existing key, ExPASy returns nothing.\n\n    >>> from Bio import ExPASy\n    >>> from Bio.ExPASy import Prosite\n    >>> with ExPASy.get_prosite_raw('PS00001') as handle:\n    ...    record = Prosite.read(handle)\n    ...\n    >>> print(record.accession)\n    PS00001\n\n\n    For a non-existing key, ExPASy returns an error:\n\n    >>> handle = get_prosite_raw(\"does_not_exist\")\n    Traceback (most recent call last):\n    ...\n    urllib.error.HTTPError: HTTP Error 404: Not Found\n\n    \"\"\"\n    url = \"https://prosite.expasy.org/%s.txt\" % id\n    return _binary_to_string_handle(_urlopen(url))\n\n\ndef get_sprot_raw(id):\n    \"\"\"Get a text handle to a raw SwissProt entry at ExPASy.\n\n    For an ID of XXX, fetches http://www.uniprot.org/uniprot/XXX.txt\n    (as per the https://www.expasy.org/expasy_urls.html documentation).\n\n    >>> from Bio import ExPASy\n    >>> from Bio import SwissProt\n    >>> with ExPASy.get_sprot_raw(\"O23729\") as handle:\n    ...     record = SwissProt.read(handle)\n    ...\n    >>> print(record.entry_name)\n    CHS3_BROFI\n\n    For a non-existing identifier, UniProt returns an error:\n\n    >>> ExPASy.get_sprot_raw(\"DOES_NOT_EXIST\")\n    Traceback (most recent call last):\n    ...\n    urllib.error.HTTPError: HTTP Error 404: Not Found\n\n    \"\"\"\n    url = \"http://www.uniprot.org/uniprot/%s.txt\" % id\n    return _binary_to_string_handle(_urlopen(url))\n", "path": "Bio/ExPASy/__init__.py"}]}