Python requests.get(URL) returns 使用带点的 URL 时出现 404 错误

Python requests.get(URL) returns 404 error when using URL with dot

我正在尝试使用 Python 的请求库获取网页 https://finance.yahoo.com/quote/AFLT.ME

此 link 在浏览器中打开良好,但在使用此代码时导致错误 404:

import requests
r = requests.get('https://finance.yahoo.com/quote/AFLT.ME')

我很确定问题出在“AFLT.ME”中的点 (.) 符号中,因为代码适用于不带点的 URL - 例如 https://finance.yahoo.com/quote/AAPL

我已经找到解决这个问题的答案,但是是在网站所有者方面。

但是我如何通过 GET 请求解决这个问题?

我尝试了一些建议,不幸的是没有帮助:

奇怪,好像如果发送User-Agent header,即使是空值,它也会以200响应:

>>> requests.get('https://finance.yahoo.com/quote/AFLT.ME', headers={'User-Agent': ''})
<Response [200]>

编辑: 这里报告了同样的问题:https://whosebug.com/a/68259438/9835872