diff --git a/learning_resources/etl/podcast.py b/learning_resources/etl/podcast.py index 0b07b84a7b..c1256003ca 100644 --- a/learning_resources/etl/podcast.py +++ b/learning_resources/etl/podcast.py @@ -19,6 +19,11 @@ CONFIG_FILE_REPO = "mitodl/open-podcast-data" CONFIG_FILE_FOLDER = "podcasts" TIMESTAMP_FORMAT = "%a, %d %b %Y %H:%M:%S %z" +BROWSER_UA_HEADERS = { + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/39.0.2171.95 Safari/537.36" +} log = logging.getLogger() @@ -128,7 +133,7 @@ def extract(): for playlist_config in configs: rss_url = playlist_config["rss_url"] try: - response = requests.get(rss_url) # noqa: S113 + response = requests.get(rss_url, headers=BROWSER_UA_HEADERS) # noqa: S113 response.raise_for_status() feed = bs(response.content, "xml")