Giter Club home page Giter Club logo

alipay_fetcher's Introduction

alipay_fetcher

一个自动登录并抓取支付宝余额交易详单的小工具,仅适用于普通个人账户,企业账户和开通了商户服务的账户查询交易详单的页面不同,而且,你们有API不用用这个是自虐吗?

Update:20190131 这次的修改其实主要是几个点: 1.Phantom好像已经不被selenium支持了,所以改成了Firefox headless。 通过Firefox headless模拟登录过程,你也可以自己替换成chrome headless,需要安装selenium的gecko driver,mac上一个brew命令就搞定了。

2.支付宝的密码输入控件id名称变了“password_rsainput”,其他的倒是基本没变。但是在输入用户名和密码和验证码的时候,都必须输入一个字符就延迟一下,模拟真实的用户输入,直接sendkey()是不行的。

3.原来验证码是用打码兔实现的,几年没看,打码兔好像跑路了还是倒闭了,反正已经没必要了。 参考v2ex上的帖子,原来只需要每分钟访问交易记录的同时访问一下会员中心页面,session就不会有10分钟过期的问题了,就算如果session掉了也会自动重新登录,手工输入一下验证码也不会有多麻烦,当然你可以自己修改resolve_captcha()函数实现自动化的验证码识别。 在本机上用firefox headless登录,很大概率上连验证码都不需要,也许支付宝的风控认为就是你在用自己的电脑手工登录。

4.数据处理部分我依然没有做特别细化的东西,只是把第一页的每条收入交易列出来,按字段填充到json数据里,具体怎么处理按你自己的需求改。

使用方法很简单,参考test.py就行了,其实就是改一下你的用户名和密码,就行了。

代码水平很烂,看得不爽请随便fork后随便修改,没有版权限制。

alipay_fetcher's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.