Repository: electricitymaps/electricitymaps-contrib

Issue:
RU production parser down
## Description

This is an automatic error report generated for Russia (RU).

Issues:
- No recent data found for `consumption` parser
- No recent data found for `consumptionForecast` parser
- No recent data found for `generationForecast` parser
- No recent data found for `price` parser
- No recent data found for `production` parser
- No recent data found for `productionPerModeForecast` parser

## Suggestions
- Try running the parser locally using the command `poetry run test_parser RU production`
- <a href="https://storage.googleapis.com/electricitymap-parser-logs/RU.html">Explore the runtime logs</a>

You can see an overview of all parser issues [here](https://github.com/tmrowco/electricitymap-contrib/wiki/Parser-issues).



Discussion:
Perfect! Let it be like this until the war against the Ukrainian people stops and Vlad0lf Vlad0lf0witsh Putler's and Mini-Putler's a**es will be kicked out of their remote bunkers, feet first. (And make sure to disable these parsers anyways to prevent any possible "collateral damage" towards you...). #SlavaUkraini!
It looks like http://br.so-ups.ru/ doesn't work outside Russia
Unless we anticipate it coming back soonish, we might want to remove references to the parser from the config files so these issues can be closed

Resolving patch:
diff --git a/parsers/RU.py b/parsers/RU.py
--- a/parsers/RU.py
+++ b/parsers/RU.py
@@ -14,7 +14,9 @@
 # Handling of hours: data at t on API side corresponds to
 # production / consumption from t to t+1
 
-BASE_EXCHANGE_URL = "http://br.so-ups.ru/webapi/api/flowDiagramm/GetData?"
+# http://br.so-ups.ru is not available outside Russia (sometimes?), use a reverse proxy in Russia
+HOST = "https://858127-cc16935.tmweb.ru"
+BASE_EXCHANGE_URL = f"${HOST}/webapi/api/flowDiagramm/GetData?"
 
 MAP_GENERATION_1 = {
     "P_AES": "nuclear",
@@ -118,12 +120,12 @@ def fetch_production_1st_synchronous_zone(
     r = session or requests.session()
 
     price_zone = zone_key_price_zone_mapper[zone_key]
-    base_url = "http://br.so-ups.ru/webapi/api/CommonInfo/PowerGeneration?priceZone[]={}".format(
-        price_zone
+    base_url = "{}/webapi/api/CommonInfo/PowerGeneration?priceZone[]={}".format(
+        HOST, price_zone
     )
     url = base_url + "&startDate={date}&endDate={date}".format(date=date)
 
-    response = r.get(url)
+    response = r.get(url, verify=False)
     json_content = json.loads(response.text)
     dataset = json_content[0]["m_Item2"]
 
@@ -182,11 +184,11 @@ def fetch_production_2nd_synchronous_zone(
 
     r = session or requests.session()
 
-    url = "https://br.so-ups.ru/webapi/api/CommonInfo/GenEquipOptions_Z2?oesTerritory[]=540000&startDate={}".format(
-        date
+    url = "{}/webapi/api/CommonInfo/GenEquipOptions_Z2?oesTerritory[]=540000&startDate={}".format(
+        HOST, date
     )
 
-    response = r.get(url)
+    response = r.get(url, verify=False)
     json_content = json.loads(response.text)
     dataset = json_content[0]["m_Item2"]
 
@@ -279,7 +281,7 @@ def fetch_exchange(
 
     datapoints = []
     for url, hour in exchange_urls:
-        response = r.get(url)
+        response = r.get(url, verify=False)
         json_content = json.loads(response.text)
 
         if response_checker(json_content):


Test patch: