直接不隐讳的直接说了,想写个 python 脚本帮朋友申请签证名额,
import sys import mechanize url ='xxx' response2=br.open(url) request = br.request print (response2.info()) print (response2.read())
Cache-Control: no-store, must-revalidate, no-cache, max-age=0 Content-Type: text/html Connection: close Vary: Accept-Encoding Pragma: no-cache Expires: -1 CacheControl: no-cache X-UA-Compatible: IE=edge Content-Type: text/html; charset= ... more content ... <noscript>Please enable Javascript to view the page content.</noscript> </head><body> </body></html>
from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Firefox() url= 'xxx' driver.get(url) print driver.context print driver.title print driver.page_source driver.close()
nosctipt 同上
1 golmic 2017-06-19 16:14:46 +08:00 怎么登录,需要用户名密码啊。可以帮你看看 |
![]() | 2 chuanqirenwu 2017-06-19 16:54:19 +08:00 直接开 selenium 在真机上刷,以前刷论坛是这么做的。 |
![]() | 3 LeeSeoung 2017-06-19 17:02:08 +08:00 1、需要 JS 要么协议头有问题,要么获取了 cookies,要处理。 2、对接验证码平台。 |
![]() | 4 XiaoFaye 2017-06-19 17:03:32 +08:00 楼主,是新西兰的 WHV 签证吧?别爬了,没用的。这个现在只能靠手速和自动填表了。23 号就开抢了,你现在准备也太晚了吧?今年网站已经改版了,表格最新的 DOM 信息有吗?付款页面的 DOM 信息有吗?这些我都有,不过一早已经没兴趣抢了。不过移民政策改了,相信今年抢的人不会那么多了,君不见淘宝的代抢价格已经从 7000 多降到 4000 多了吗? 最后,祝你朋友好运啦! |
5 bget 2017-06-20 07:10:10 +08:00 推荐个爬虫软件你试一下:www.sensite.cn/bget,支持 JS 解析,扩展性强,支持可视化配置。 |
![]() | 6 prasanta 2017-06-21 14:39:44 +08:00 via Android 你还不如写一个 chrome 插件,自动填表 |
![]() | 7 way2explore2 OP @XiaoFaye 这对朋友不是中国的,开抢事件不一样 |
![]() | 8 way2explore2 OP |
![]() | 9 way2explore2 OP @XiaoFaye 另外,Dom 真的不是问题,你看一眼他的 form 你就知道了 |
![]() | 10 way2explore2 OP |
![]() | 11 way2explore2 OP @chuanqirenwu 我试了 selenium,你说的真机上刷,是指? |
![]() | 12 MatrixMan 2023-05-18 15:03:35 +08:00 老哥有成功过吗?我最近想研究一下,搞一下这个 |