Python下载嵌入页面的PDF [英] Python Download PDF Embedded in a Page

查看:354
本文介绍了Python下载嵌入页面的PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此链接:

我想下载嵌入的PDF.

I want to download the embedded PDF.

我尝试了urllibrequest的常规方法,但是它们不起作用.

I have tried the normal methods of urllib and request but they're not working.

import urllib2

url = "http://www.equibase.com/premium/chartEmb.cfm?track=ALB&raceDate=06/17/2002&cy=USA&rn=1"
response = urllib2.urlopen(url)
file = open("document.pdf", 'wb')
file.write(response.read())
file.close()

此外,我也试图找到pdf的原始链接,但它也没有用.

Moreover, I have also tried to find the original link of the pdf but it also did not work.

内部链接:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆