Code Monkey home page Code Monkey logo

ctrip_mention's Introduction

机票提醒服务

自动获取低价机票并发送微信通知(每天五次)

安装第三方依赖包

pip install lxml urllib3 requests selenium

微信通知服务

感谢server酱提供的微信通知服务API

请到server酱官网获取sendKey

修改代码

修改sendKey, 请到server酱官网获取sendKey

WECHAT_MSG_URL = 'https://sctapi.ftqq.com/你的sendKey.send'

选择对应系统的chromedriver

将你的Chrome浏览器对应版本的chromedriver放入drivers目录中 修改161行 为你自己的chromedriver路径

driver = webdriver.Chrome(
    executable_path="./drivers/chromedriver_linux", options=options
    # executable_path="./drivers/chromedriver", options=options
)

启动参数

-leave: 出发城市代码, 可以打开ctrip.com搜索出发城市获取出发城市代码

-reach: 到达城市代码

-date: 出发时间, 会自动获取前后一天时间的机票(格式: 2022-01-01),

-price: 目标票价

启动脚本

python ctrip_spider.py -leave CTU -reach SHA -date 2022-01-01 -price 1000

ctrip_mention's People

Contributors

krisshin avatar

Stargazers

PercyWai avatar

Watchers

James Cloos avatar  avatar

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.