PS:Invoke-WebRequest - 第二次调用是编码

时间:2017-11-20 03:23:50

标签: powershell webrequest

使用

调用网址时
$source = Invoke-WebRequest -Uri $URL

第一个请求工作正常,但是在同一个会话中调用与同一个域不同的页面,我得到了看起来像编码源的内容。

这是一个小例子 工作URL呼叫(第一次呼叫)

  

RawContent:HTTP / 1.1 200 OK                       内容 - 语言:en-US                       X-Frame-Options:SAMEORIGIN                       转移编码:分块                       连接:keep-alive,Transfer-Encoding                       缓存控制:无存储,无缓存                       Content-Type:text / html; ... Forms:{,filter-> form}标题:{[Content-Language,en-US],   [X-Frame-Options,SAMEORIGIN],[Transfer-Encoding,chunked],   [连接,保持活动,传输编码] ...}图像:   {@ {的innerHTML =;的innerText =; outerHTML = aa846a08e9b3 / IDM-仪器-PTY-LTD-哈勒姆-3803-logo.jpg“取代;   outerText =;的tagName = IMG;标题= IDM                       Instruments Pty Ltd - 标志; class = listing-logo enhanced-> logo; alt = IDM Instruments Pty Ltd - logo;

非工作电话(第二次网址电话)

  

RawContent:HTTP / 1.1 200 OK                       内容 - 语言:en-US                       X-Frame-Options:SAMEORIGIN                       连接:保持活力                       内容长度:14201                       缓存控制:max-age = 86400,public                       Content-Type:text / html; charset = utf-8                       日期:...表格:{captcha}标题:> {[Content-Language,en-US],[X-Frame-Options,SAMEORIGIN],    [连接,保持活动],[内容长度,14201] ...}图像
  :{@ {innerHTML =;的innerText =; outerHTML =      

alt =“黄页”   SRC =“数据:图像/ PNG; BASE64,iVBORw0KGgoAAAANSUhEUgAAAIwAAACMCAYAAACuwEE + AAAAG                       >   XRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFa5JREFUeNrsXQl4FMXWrYQlLLIJAgYE> BAFZZAeRIKs8FgU1GkBQCPIEcQH9hfwqAoryFEVx + 9gVAYOCCgq4REXBCIYlbD4gQESW4BKRhE2IIel                       >   3T0 / N2Pv0TCaTnpk633cI011d3VV1 + 9atW7eqo1hkIYZYk / MKYjViJeJl / G8UsaLmmvNEiXiWeI7 / ZS> H + QczmzIuUCowK47LVIHYhdiReR2xNbFBM9zpC3E38kbiNuJl4kgk4GpWJ8cSFxAyuFUqSGfxZ4vmzC                       >   TgAscSHiRuJ + Q4QEjPm82d8mD + zQBBRgZhIXE8sdLCQmLGQP3siL4tAMaEFcQ4xNwSFxIy5vEwtRPMG> Dr2Jn4aRkJjxU15WAT / Rh5gWAYKiZRovu4BNdCZuiEBB0XIDrwsBE9QhJ​​gtB0TGZ140AR2niRIVHVVD

任何帮助都会很棒。

0 个答案:

没有答案