For some reason I can't get this to download and the content type is html\text and not pdf. The downloaded pdf file is always very small and when I try to open it the file is corrupted.
import request
docketnumber='1'
r = requests.get('https://cases.stretto.com/public/X070/10255/PLEADINGS/1025505242280000000049.pdf', allow_redirects=True, headers={'User-Agent': 'Mozilla/5.0'})
print(r.headers.get('content-type'))
open('C:/MyDownloads/' + docketnumber+".pdf", 'wb' ).write(r.content)```
