查找PayPal购买现在按钮重定向链接
我正在尝试制作一个可以刮擦网站并搜索PayPal购买按钮重定向链接的程序。
我可以刮擦网站,但我意识到,当您点击按钮时,它不包含您将被重定向到购买的URL。我将如何找到按钮重定向链接,甚至如何进行网站刮擦并单击按钮以至少显示重定向站点?我是否必须以某种方式使刮板命中表格并提交?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input name="cmd" type="hidden" value="_s-xclick" /><br />
<input name="hosted_button_id" type="hidden" value="PUEGWVJXLH4FQ" /><br />
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" type="image" /><br />
<img loading="lazy" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt="" width="1" height="1" border="0" /></form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">_______________________________________________________</p>
</form>
I am trying to make a program that can scrape a site and search for PayPal buy now button redirection links.
I can scrape the site but I realize that when you hit the button, it does not contain the URL that you will be redirected to make purchase. How would I go about finding the button redirection link, or even how would I have the site scrape and click on the button to at least have the redirect site appear? Would I somehow have to make the scraper hit the form and submit?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input name="cmd" type="hidden" value="_s-xclick" /><br />
<input name="hosted_button_id" type="hidden" value="PUEGWVJXLH4FQ" /><br />
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" type="image" /><br />
<img loading="lazy" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt="" width="1" height="1" border="0" /></form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">_______________________________________________________</p>
</form>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
转到 https://www.paypal.co/buttons )创建一个使用没有下拉选项和文本字段的新简单购买按钮(需要HTML) - 一旦创建了按钮,并且您正在查看生成的代码,请切换到“ E-邮寄“上方”标签。
该电子邮件选项卡中的链接将具有托管按钮ID,您可以将其交换 /使用以动态生成您所要求的“重定向链接”。加载在浏览器中时,该链接将启动结帐,与单击按钮相同。
还有其他几种类型的PayPal付款按钮,包括:
构建工作URL的另一种方法是从表单的操作参数开始获取字符串,并从具有
name
的表单中添加所有输入,并带有语法name = value
,由'&amp;'隔开....所以:例如:https://www.paypal.com/cgi-bin/webscr?hosted_button_id = puegwvjxlh4fq&amp; enothername = enternValue&amp; ...
Go to https://www.paypal.co/buttons, log in, and (after logging in) create a new simple Buy Now button with no dropdown options nor text fields (which require HTML) -- and once the button is created and you are viewing the generated code, switch over to the "E-mail" tab above it.
The link in that E-mail tab will have a hosted button ID, which you can swap out / use to dynamically generate the Buy Now "redirection link" you're asking for. When loaded in a browser, that link will initiate a checkout, same as clicking the button.
There are several other types of PayPal payment buttons, including:
Another way to construct a working URL is to begin with the form's action parameter
https://www.paypal.com/cgi-bin/webscr
, add?
to begin a GET string, and add all the inputs from the form that have aname
, in with the syntaxname=value
, separated by '&' .... so for example:https://www.paypal.com/cgi-bin/webscr?hosted_button_id=PUEGWVJXLH4FQ&anothername=anothervalue&...