Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add user-agent header for rawpixel (#3679)
Staci Mullins487142a05b5d
diff --git a/catalog/dags/providers/provider_api_scripts/rawpixel.py b/catalog/dags/providers/provider_api_scripts/rawpixel.pyindex f36e04f77..ac9eaf06a 100644--- a/catalog/dags/providers/provider_api_scripts/rawpixel.py+++ b/catalog/dags/providers/provider_api_scripts/rawpixel.py@@ -80,6 +80,7 @@ class RawpixelDataIngester(ProviderDataIngester):def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)self.api_key: str = Variable.get("API_KEY_RAWPIXEL")+ self.headers = {"User-Agent": prov.UA_STRING}def get_media_type(self, record: dict) -> str:return constants.IMAGE