I\'m using the Python requests lib to get a PDF file from the web. This works fine, but I now also want the original filename. If I go to a PDF file in Firefox and click
easy python3 implementation to get filename from Content-Disposition:
import requests response = requests.get() print(response.headers.get("Content-Disposition").split("filename=")[1])