本文整理匯總了Python中InternetArchiveCommon.make_pdf_delete_request方法的典型用法代碼示例。如果您正苦於以下問題:Python InternetArchiveCommon.make_pdf_delete_request方法的具體用法?Python InternetArchiveCommon.make_pdf_delete_request怎麽用?Python InternetArchiveCommon.make_pdf_delete_request使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InternetArchiveCommon
的用法示例。
在下文中一共展示了InternetArchiveCommon.make_pdf_delete_request方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: delete_document_from_IA
# 需要導入模塊: import InternetArchiveCommon [as 別名]
# 或者: from InternetArchiveCommon import make_pdf_delete_request [as 別名]
def delete_document_from_IA(document):
request = IACommon.make_pdf_delete_request(document.court, document.casenum, document.docnum, document.subdocnum)
try:
response = urllib2.urlopen(request)
except urllib2.HTTPError, e:
if e.code != 204:
print " the response to the delete request was %s. This may not be an error" % e.code
示例2: delete_document_from_IA
# 需要導入模塊: import InternetArchiveCommon [as 別名]
# 或者: from InternetArchiveCommon import make_pdf_delete_request [as 別名]
def delete_document_from_IA(document):
request = IACommon.make_pdf_delete_request(document.court, document.casenum, document.docnum, document.subdocnum)
print request
print request.get_full_url()
print request.get_method()
print dir(request)
try:
response = urllib2.urlopen(request)
print response
except urllib2.HTTPError, e:
if e.code != 204:
print " the response to the delete request was %s. This may not be an error" % e.code
print " response: %s" % e.code