diff --git a/README.md b/README.md index 10c22270..250e2344 100644 --- a/README.md +++ b/README.md @@ -399,3 +399,4 @@ There is a debt regarding the cleanest of the code right now. Let's just not mak ## Thanks * [Eleven-Strategy](https://www.welcometothejungle.com/fr/companies/eleven-strategy) +* [Kevin Tessier](https://kevintessier.fr) \ No newline at end of file diff --git a/quotaclimat/data_processing/mediatree/api_import.py b/quotaclimat/data_processing/mediatree/api_import.py index 2cdda10a..770e9cc9 100644 --- a/quotaclimat/data_processing/mediatree/api_import.py +++ b/quotaclimat/data_processing/mediatree/api_import.py @@ -255,6 +255,9 @@ def parse_reponse_subtitle(response_sub, channel = None, channel_program = "", c inplace=True ) + logging.debug("setting channel_title") + new_df['channel_title'] = new_df.apply(lambda x: get_channel_title_for_name(x['channel_name']), axis=1) + logging.debug(f"setting program {channel_program}") # weird error if not using this way: (ValueError) format number 1 of "20h30 le samedi" is not recognized new_df['channel_program'] = new_df.apply(lambda x: channel_program, axis=1) diff --git a/test/sitemap/test_mediatree.py b/test/sitemap/test_mediatree.py index c1a9e24c..53ec7bec 100644 --- a/test/sitemap/test_mediatree.py +++ b/test/sitemap/test_mediatree.py @@ -41,7 +41,7 @@ "text": "france" } ], - "channel":{"name":"m6","title":"M6","radio":false},"start":1704798000, + "channel":{"name":"m6","title":"fake m6","radio":false},"start":1704798000, "plaintext":"test1" }, { @@ -51,7 +51,7 @@ "text": "adaptation" } ], - "channel":{"name":"tf1","title":"TF1","radio":false},"start":1704798120, + "channel":{"name":"tf1","title":"fake TF1","radio":false},"start":1704798120, "plaintext":"test2"} ], "elapsed_time_ms":335}