Python无法使用间接URL打开图像

时间:2017-02-21 07:28:56

标签: python image download

我使用python下载图片,如果url直接显示我可以下载的图片,但如果是间接的,只打开黑色图片,我该怎么办?

成功下载

 oldcw   dw   ?

  fstcw oldcw     ;get the current Control Word to retain all setting bits
                  ;not related to the rounding control (RC) bits
  fwait       ;to insure the storage instruction is completed
  mov   ax,oldcw
; and   ax,0F3FFh ;clears only the RC bits, leaving all other bits unchanged
                  ;not necessary here because both bits will be set
  or    ax,0C00h  ;this will set both bits of the RC field to the truncating mode
                  ;without affecting any of the other field's bits
  push  eax       ;use the stack to store the modified Control Word in memory
  fldcw [esp]     ;load the modified Control Word

  fxxxx           ;other FPU instruction(s) needing the truncating mode

  fldcw oldcw     ;restore the previous Control Word
  pop   eax       ;clean-up the stack
                  ;this could also retrieve a 16-bit or 32-bit integer
                  ;possibly returned by the "other FPU instruction(s)"

下载失败

https://secure-api.userlocal.jp/ipcamera/posts/files/16/41/502241_2017022116205643436_830aaf54751.jpg

1 个答案:

答案 0 :(得分:0)

使用save_screenshot或get_screenshot_as_base64()