了解并从 ASP.NET 和 html 中提取哈希图像

发布于 2024-11-30 07:29:25 字数 1164 浏览 0 评论 0原文

好吧,这对我来说有点令人困惑,所以我可能无法正确解释这一点。

我想更新供应商网站上列出的商品数量。我正在编写一个脚本,该脚本将连接到该站点,搜索零件,然后从该站点的 html 中抓取数量列表。

但是,数量不会显示在返回的 html 中,而是列为包含该数量的图像的哈希编码链接。我认为这是一种保持数量更新的尝试。

示例:

搜索该商品后,网站显示如下内容:

MSRP:     Base:     Your Discount
$248.47   $185.01   32.00%
In Stock? 3

数字“3”呈绿色,

我认为从网站获取 html 并拉出“In Stock?3”跨度并使用会很容易那。

然而,这是(干净且漂亮的打印)从站点返回的 html:

  <tr>
      <td>MSRP:</td> <td>Base:</td> <td>Your Discount</td>
  </tr>
  <tr>
      <td>$248.47</td><td>$185.01</td><td>32.00 %<br /> </td>
  </tr>
  <tr>
      <td>In Stock?</td>
     <td>
 <img id="ctl00_phCenterColumn_SearchResults_gvCatalog_ctl03_imgQtyDetailed"
  src="_controls/TextImage.aspx?Q7z=ecdb179e-0b2d-4baf-b74b-9c4d6afc3cb4">
 </td>

图像标签显示数量的图片(仅带有数字 3 的图像)。它不会以文本形式发送数量。

我首先想,Q7z=* 是什么东西?它是图片的哈希值吗?我想它是为了让事情保持最新(尤其是数量)

其次,有没有办法从这些信息中确定数量?

我唯一的想法是如何从哈希中确定值,或者在图像上使用字符识别......对于仅仅尝试确定值来说有点太多了。

有什么想法吗?

谢谢!

尼尔

Okay this is a bit confusing to me, so I might not be able to explain this correctly.

I would like to update the quantity of an item listed on a supplier's website. I am writing a script that will connect to the site, search for a part, and then scrape the qty listing from the html in the site.

However, the quantity is not display in the return html, but instead is listed as a hash-coded link to an image, which contains the quantity. I think this is an attempt to keep the quantity updated.

Example:

After searching for the item, the website displays something like this:

MSRP:     Base:     Your Discount
$248.47   $185.01   32.00%
In Stock? 3

With the number "3" in green

I thought that it would be easy then to grab the html from the site and pull the "In Stock? 3" span and use that.

However, this is (cleaned and pretty print) the html return from the site:

  <tr>
      <td>MSRP:</td> <td>Base:</td> <td>Your Discount</td>
  </tr>
  <tr>
      <td>$248.47</td><td>$185.01</td><td>32.00 %<br /> </td>
  </tr>
  <tr>
      <td>In Stock?</td>
     <td>
 <img id="ctl00_phCenterColumn_SearchResults_gvCatalog_ctl03_imgQtyDetailed"
  src="_controls/TextImage.aspx?Q7z=ecdb179e-0b2d-4baf-b74b-9c4d6afc3cb4">
 </td>

The image tag displays a picture of the quantity (an image only with the number 3). It doesn't send the quantity as text.

I guess first, What is the Q7z=* stuff? Is it a hash of a picture for the quantity? I imagine it's there for keeping things up to date (especially quantity)

Second, is there a way to determine the quanitity from this information?

My only thoughts are to some how determine the value from the hash, or to use character recognition on the image... A little too much for just trying to determine the value.

Any ideas?

Thanks!

Neal

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

困倦 2024-12-07 07:29:25

Q7z=* 可能是图像的标识符,因为源是 aspx 页面而不是直接的图像文件。

这让你需要解码图像来获取一些令人讨厌的信息。我建议找到一种获取文本信息的方法(必须有一种方法,因为他们使用它来附加查询参数 Q7z=* 内容)。

Q7z=* could be an identifer to the image since the source is an aspx page and not an image file directly.

That leaves you with decoding the image for information which is bit nasty. I would recommend finding a way to get text info (there must be a way since they are using it to append the query param Q7z=* stuff).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文