We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
IN-AP has changed its data url
The new link is https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx (same page layout I think). Old link returns 404.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `parsers/IN_AP.py`
Content:
```
1 #!/usr/bin/env python3
2 
3 from requests import Session
4 from .lib import zonekey, IN, web
5 
6 
7 def fetch_production(zone_key='IN-AP', session=None, target_datetime=None, logger=None):
8     """Fetch Andhra Pradesh  production"""
9     if target_datetime:
10         raise NotImplementedError('This parser is not yet able to parse past dates')
11 
12     zonekey.assert_zone_key(zone_key, 'IN-AP')
13 
14     html = web.get_response_soup(zone_key,
15                                  'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)
16     india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')
17 
18     hydro_value = IN.read_value_from_span_id(html, 'lblHydel')
19     gas_value = IN.read_value_from_span_id(html, 'lblGas')
20     wind_value = IN.read_value_from_span_id(html, 'lblWind')
21     solar_value = IN.read_value_from_span_id(html, 'lblSolar')
22 
23     # All thermal centrals are considered coal based production
24     # https://en.wikipedia.org/wiki/Power_sector_of_Andhra_Pradesh
25     thermal_value = IN.read_value_from_span_id(html, 'lblThermal')
26 
27     cgs_value = IN.read_value_from_span_id(html, 'lblCGS')
28     ipp_value = IN.read_value_from_span_id(html, 'lblIPPS')
29 
30     data = {
31         'zoneKey': zone_key,
32         'datetime': india_date.datetime,
33         'production': {
34             'biomass': 0.0,
35             'coal': thermal_value,
36             'gas': gas_value,
37             'hydro': hydro_value,
38             'nuclear': 0.0,
39             'oil': 0.0,
40             'solar': solar_value,
41             'wind': wind_value,
42             'geothermal': 0.0,
43             'unknown': round(cgs_value + ipp_value, 2)
44         },
45         'storage': {
46             'hydro': 0.0
47         },
48         'source': 'core.ap.gov.in',
49     }
50 
51     return data
52 
53 
54 def fetch_consumption(zone_key='IN-AP', session=None, target_datetime=None, logger=None):
55     """Fetch Andhra Pradesh consumption"""
56     if target_datetime:
57         raise NotImplementedError('This parser is not yet able to parse past dates')
58 
59     zonekey.assert_zone_key(zone_key, 'IN-AP')
60 
61     html = web.get_response_soup(zone_key,
62                                  'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)
63     india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')
64 
65     demand_value = IN.read_value_from_span_id(html, 'lblGridDemand')
66 
67     data = {
68         'zoneKey': zone_key,
69         'datetime': india_date.datetime,
70         'consumption': demand_value,
71         'source': 'core.ap.gov.in'
72     }
73 
74     return data
75 
76 
77 if __name__ == '__main__':
78     session = Session()
79     print(fetch_production('IN-AP', session))
80     print(fetch_consumption('IN-AP', session))
81
```
--- 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/parsers/IN_AP.py b/parsers/IN_AP.py
--- a/parsers/IN_AP.py
+++ b/parsers/IN_AP.py
@@ -3,7 +3,6 @@
 from requests import Session
 from .lib import zonekey, IN, web
 
-
 def fetch_production(zone_key='IN-AP', session=None, target_datetime=None, logger=None):
     """Fetch Andhra Pradesh  production"""
     if target_datetime:
@@ -12,7 +11,7 @@
     zonekey.assert_zone_key(zone_key, 'IN-AP')
 
     html = web.get_response_soup(zone_key,
-                                 'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)
+                                 'https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)
     india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')
 
     hydro_value = IN.read_value_from_span_id(html, 'lblHydel')
@@ -59,7 +58,7 @@
     zonekey.assert_zone_key(zone_key, 'IN-AP')
 
     html = web.get_response_soup(zone_key,
-                                 'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)
+                                 'https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)
     india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')
 
     demand_value = IN.read_value_from_span_id(html, 'lblGridDemand')

{"golden_diff": "diff --git a/parsers/IN_AP.py b/parsers/IN_AP.py\n--- a/parsers/IN_AP.py\n+++ b/parsers/IN_AP.py\n@@ -3,7 +3,6 @@\n from requests import Session\n from .lib import zonekey, IN, web\n \n-\n def fetch_production(zone_key='IN-AP', session=None, target_datetime=None, logger=None):\n     \"\"\"Fetch Andhra Pradesh  production\"\"\"\n     if target_datetime:\n@@ -12,7 +11,7 @@\n     zonekey.assert_zone_key(zone_key, 'IN-AP')\n \n     html = web.get_response_soup(zone_key,\n-                                 'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n+                                 'https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n     india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')\n \n     hydro_value = IN.read_value_from_span_id(html, 'lblHydel')\n@@ -59,7 +58,7 @@\n     zonekey.assert_zone_key(zone_key, 'IN-AP')\n \n     html = web.get_response_soup(zone_key,\n-                                 'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n+                                 'https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n     india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')\n \n     demand_value = IN.read_value_from_span_id(html, 'lblGridDemand')\n", "issue": "IN-AP has changed its data url\nThe new link is https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx (same page layout I think). Old link returns 404.\n", "before_files": [{"content": "#!/usr/bin/env python3\n\nfrom requests import Session\nfrom .lib import zonekey, IN, web\n\n\ndef fetch_production(zone_key='IN-AP', session=None, target_datetime=None, logger=None):\n    \"\"\"Fetch Andhra Pradesh  production\"\"\"\n    if target_datetime:\n        raise NotImplementedError('This parser is not yet able to parse past dates')\n\n    zonekey.assert_zone_key(zone_key, 'IN-AP')\n\n    html = web.get_response_soup(zone_key,\n                                 'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n    india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')\n\n    hydro_value = IN.read_value_from_span_id(html, 'lblHydel')\n    gas_value = IN.read_value_from_span_id(html, 'lblGas')\n    wind_value = IN.read_value_from_span_id(html, 'lblWind')\n    solar_value = IN.read_value_from_span_id(html, 'lblSolar')\n\n    # All thermal centrals are considered coal based production\n    # https://en.wikipedia.org/wiki/Power_sector_of_Andhra_Pradesh\n    thermal_value = IN.read_value_from_span_id(html, 'lblThermal')\n\n    cgs_value = IN.read_value_from_span_id(html, 'lblCGS')\n    ipp_value = IN.read_value_from_span_id(html, 'lblIPPS')\n\n    data = {\n        'zoneKey': zone_key,\n        'datetime': india_date.datetime,\n        'production': {\n            'biomass': 0.0,\n            'coal': thermal_value,\n            'gas': gas_value,\n            'hydro': hydro_value,\n            'nuclear': 0.0,\n            'oil': 0.0,\n            'solar': solar_value,\n            'wind': wind_value,\n            'geothermal': 0.0,\n            'unknown': round(cgs_value + ipp_value, 2)\n        },\n        'storage': {\n            'hydro': 0.0\n        },\n        'source': 'core.ap.gov.in',\n    }\n\n    return data\n\n\ndef fetch_consumption(zone_key='IN-AP', session=None, target_datetime=None, logger=None):\n    \"\"\"Fetch Andhra Pradesh consumption\"\"\"\n    if target_datetime:\n        raise NotImplementedError('This parser is not yet able to parse past dates')\n\n    zonekey.assert_zone_key(zone_key, 'IN-AP')\n\n    html = web.get_response_soup(zone_key,\n                                 'http://www.core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n    india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')\n\n    demand_value = IN.read_value_from_span_id(html, 'lblGridDemand')\n\n    data = {\n        'zoneKey': zone_key,\n        'datetime': india_date.datetime,\n        'consumption': demand_value,\n        'source': 'core.ap.gov.in'\n    }\n\n    return data\n\n\nif __name__ == '__main__':\n    session = Session()\n    print(fetch_production('IN-AP', session))\n    print(fetch_consumption('IN-AP', session))\n", "path": "parsers/IN_AP.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n\nfrom requests import Session\nfrom .lib import zonekey, IN, web\n\ndef fetch_production(zone_key='IN-AP', session=None, target_datetime=None, logger=None):\n    \"\"\"Fetch Andhra Pradesh  production\"\"\"\n    if target_datetime:\n        raise NotImplementedError('This parser is not yet able to parse past dates')\n\n    zonekey.assert_zone_key(zone_key, 'IN-AP')\n\n    html = web.get_response_soup(zone_key,\n                                 'https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n    india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')\n\n    hydro_value = IN.read_value_from_span_id(html, 'lblHydel')\n    gas_value = IN.read_value_from_span_id(html, 'lblGas')\n    wind_value = IN.read_value_from_span_id(html, 'lblWind')\n    solar_value = IN.read_value_from_span_id(html, 'lblSolar')\n\n    # All thermal centrals are considered coal based production\n    # https://en.wikipedia.org/wiki/Power_sector_of_Andhra_Pradesh\n    thermal_value = IN.read_value_from_span_id(html, 'lblThermal')\n\n    cgs_value = IN.read_value_from_span_id(html, 'lblCGS')\n    ipp_value = IN.read_value_from_span_id(html, 'lblIPPS')\n\n    data = {\n        'zoneKey': zone_key,\n        'datetime': india_date.datetime,\n        'production': {\n            'biomass': 0.0,\n            'coal': thermal_value,\n            'gas': gas_value,\n            'hydro': hydro_value,\n            'nuclear': 0.0,\n            'oil': 0.0,\n            'solar': solar_value,\n            'wind': wind_value,\n            'geothermal': 0.0,\n            'unknown': round(cgs_value + ipp_value, 2)\n        },\n        'storage': {\n            'hydro': 0.0\n        },\n        'source': 'core.ap.gov.in',\n    }\n\n    return data\n\n\ndef fetch_consumption(zone_key='IN-AP', session=None, target_datetime=None, logger=None):\n    \"\"\"Fetch Andhra Pradesh consumption\"\"\"\n    if target_datetime:\n        raise NotImplementedError('This parser is not yet able to parse past dates')\n\n    zonekey.assert_zone_key(zone_key, 'IN-AP')\n\n    html = web.get_response_soup(zone_key,\n                                 'https://core.ap.gov.in/CMDashBoard/UserInterface/Power/PowerReport.aspx', session)\n    india_date = IN.read_datetime_from_span_id(html, 'lblPowerStatusDate', 'DD-MM-YYYY HH:mm')\n\n    demand_value = IN.read_value_from_span_id(html, 'lblGridDemand')\n\n    data = {\n        'zoneKey': zone_key,\n        'datetime': india_date.datetime,\n        'consumption': demand_value,\n        'source': 'core.ap.gov.in'\n    }\n\n    return data\n\n\nif __name__ == '__main__':\n    session = Session()\n    print(fetch_production('IN-AP', session))\n    print(fetch_consumption('IN-AP', session))\n", "path": "parsers/IN_AP.py"}]}