Git Product home page Git Product logo

weixincookbook's Introduction

##功能

这是查看菜谱微信号后台程序,运行效果如下:

功能为用户输入食材名,如“牛肉”,“西瓜”,“黄瓜”,或菜谱的特点,如“清凉”,“辣”,公众号可返回符合用户要求的菜谱,点即可查看。

数据是通过聚合数据的API接口得到,第一次得到数据后储存在数据库中,下次请求直接从数据库获得数据即可。

##使用方法

关注公共号lufooo,输入菜名即可。扫二维码也可关注:

##运行环境

将所有代码托管到服务器上,设定好微信公共号的服务器地址,服务器要求有以下python库:wechat_sdk,chardet,MySQLdb。将appKey.py里的APPKEY替换为你在聚合数据申请的APPKEY,参考getCaipu.py,getIDFromTag.py,getIDFromName.py里操作数据库的语句,在服务器上创建对应的数据库,如果使用数据库时遇到关于编码的问题,可以参考我的博客。执行下面语句:

sudo python webApp.py 80

即可在你的微信公共号里查询菜谱。

本项目提供API接口,运行:

python api.py 8000(任意未被占用的端口号)

访问服务器的域名+端口号,得到JSON格式数据。

weixincookbook's People

Contributors

lufo816 avatar

Watchers

James Cloos avatar sthWrong 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.