USPS 的脚本

发布于 2024-08-06 17:56:58 字数 301 浏览 12 评论 0原文

我正在尝试编写一个脚本来在 USPS 中查找邮政编码。 URL =“http://zip4.usps.com/zip4/citytown_zip.jsp”。通过 POST 提交的数据为:

zip5=YOURZIPCODE&submit.x=3&submit.y=22&submit=Find+ZIP+Code

我很难找到的部分是这些数字是如何生成的: 提交.x=3 commit.y=22

上面两个总是“提交”的 X 和 Y 值总是会改变。我能弄清楚 这些数字被放入字符串中。

任何想法将不胜感激。

I am trying to write a script that does a zip code look up at the USPS.
URL="http://zip4.usps.com/zip4/citytown_zip.jsp". The data gets submitted by POST is:

zip5=YOURZIPCODE&submit.x=3&submit.y=22&submit=Find+ZIP+Code

The part I am having a hard time finding is how these numbers get generated:
submit.x=3
submit.y=22

The above two always "submit" values for X and Y always change. I can figure out
those number get put into the string.

Any thoughts would be greatly appreciated.

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

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

发布评论

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

评论(3

相守太难 2024-08-13 17:56:59

这些是图像按钮单击的坐标。它们的值仅给出单击按钮时鼠标在按钮上的位置。在这种情况下,它们将毫无意义,只需将它们都设为 1 或其他值即可。

Those are the coordinates for a image-button click. Their values just give the mouse position on the button when it was clicked. In this case, they are going to be meaningless, just make them both 1 or something.

儭儭莪哋寶赑 2024-08-13 17:56:59

“用户只能出于以下目的从本网站查看和下载材料:(a) 供个人、非商业家庭使用”

http://www.usps.com/homearea/docs/termsofuse.htm?from=global_footer&page=termsofuse

来自上面的链接。

"Users may view and download material from this site only for the following purposes: (a) for personal, non-commercial home use"

http://www.usps.com/homearea/docs/termsofuse.htm?from=global_footer&page=termsofuse

From the link above.

终难愈 2024-08-13 17:56:59

正如第一个答案所说,这只是美国邮政试图阻止任何人构建自动化脚本来通过该表单访问数据。他们期望来自给定 IP 地址的每个请求的数字略有不同。

“当你可以阻止某人做某事时,你就可以通过允许他们完成某事而获得报酬”

只需输入 1 到图像按钮最大尺寸之间的随机数即可。

我不会费心尝试“合法”地做到这一点,他们的法律术语毫无意义:
http://techref.massmind.org/techref/ecommerce/shipAPIlegal.htm 另请参阅该页面标题中的“运送”链接。

As the first answer says, that is just the USPS trying to keep anyone from building an automated script to access data through that form. They expect slightly different numbers for each request from a given IP address.

"when you can prevent someone from doing something, you can get paid to allow them to get things done"

Just put in random numbers between 1 and the max size of the image button and it will work.

And I would not bother trying to do it "legally", their legal terms make no sense:
http://techref.massmind.org/techref/ecommerce/shipAPIlegal.htm also see the "Shipping" link in the heading for that page.

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