GithubHelp home page GithubHelp logo

amazon_rest's Introduction

Amazon_REST

针对 爬取到的 Amazon数据提供的REST API。

API采用Python Eve完成。

由于Eve的一些访问问题,采用 Django REST重新实现访问框架 提供对Amazon商品信息的访问。

目前提供的接口:

1, api/commodity/

获得商品的所有分类,返回分类名列表

[{'name':'A>B>C', 'count': 600}, {'name':'D>E>F', 'count': 600}]

2, api/commodity/?category_name=A>B>C

返回指定Category的商品,默认返回第一页集合,共20条, 如果需要多页的话加上参数 page=n即 &page=n

3, api/commodity/BSDFSDSD/

获得某一个指定asin的商品

注:如果需要特定的数据,可以加上参数 field=['filedA','filedB'] 这样获得数据的响应会相对较短,例如只需要商品的review信息 api/commodity/SADFSFSF/?field=['review'] 对于2条也是通用的 api/commodity/?category_name=A>B>C&field=['review']

4, api/commodity/field

查看可用的field

5, api/commodity/custom?query={}&ret={}&page=n

自定义查询语句,query表示条件,ret表示需要返回的数据,page可选,默认为1 具体语法可以参考MongoDB,对应参数为 db.collection.find(query, ret).skip(n-1)

amazon_rest's People

Contributors

skymoney avatar

Watchers

 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.