新加坡食物需求图书馆

pySGDabao的Python项目详细描述


Pysgdabao

为您的新加坡食品配送需求提供图书馆

当前支持

  • 食品标准
  • 交付
  • 诚实的蜜蜂

开始

frompySGDabaoimport*postal_code=530511foodpanda_client=Foodpanda(postal_code)print(foodpanda_client.get_menu_items("KFC (Hougang Mall)"))"""[    {        "description": "1 HotBlaze Grilled Chicken, 3 pcs Nuggets, 1 side and 1 drink",        "image": "",        "name": "HotBlaze Grilled Meal",        "price": 10.95    },    {        "description": "1 HotBlaze Grilled Chicken, 3 pcs Chicken, 3 pcs Hot & Crispy Tenders, 2 sides and 2 drinks",        "image": "",        "name": "HotBlaze Grilled Buddy Meal",        "price": 26.95    },    ...]"""

主要功能

pySGDabao.Foodpanda(self, postal_code, base_url="https://sg.fd-api.com/")

pySGDabao.Deliveroo(self, postal_code, base_url="https://deliveroo.com.sg/")

pySGDabao.Honestbee(self, postal_code, base_url="https://www.honestbee.sg/")

Creates an object that stores information regarding the available restaurants located near the given postal code. If base_url is specified, all HTTP requests to be made will be relative to it.


pySGDabao.Foodpanda.get_restaurant_names()

pySGDabao.Deliveroo.get_restaurant_names()

pySGDabao.Honestbee.get_restaurant_names()

Gets a list of restaurant names near the given postal code


pySGDabao.Foodpanda.get_url(restaurant_name)

pySGDabao.Deliveroo.get_url(restaurant_name)

pySGDabao.Honestbee.get_url(restaurant_name)

Gets the URL link to the given restaurant's page


pySGDabao.Foodpanda.get_menu_items(restaurant_name)

pySGDabao.Deliveroo.get_menu_items(restaurant_name)

pySGDabao.Honestbee.get_menu_items(restaurant_name)

Gets a list of dictionaries comprising the name, description, price and image URL of each item sold by the given restaurant


高级功能

pySGDabao.Foodpanda.scrape_restaurants()

pySGDabao.Deliveroo.scrape_restaurants()

pySGDabao.Honestbee.scrape_restaurants()

Returns the raw JSON from the website's search page


pySGDabao.Foodpanda.scrape_menu(restaurant_name)

pySGDabao.Deliveroo.scrape_menu(restaurant_name)

pySGDabao.Honestbee.scrape_menu(restaurant_name)

Returns the raw JSON from the given restaurant's page

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java组织。openqa。硒。遥远的UnreachableBrowserException如何定义EXE路径?   java Camel AdviceWith不使用指定文件替换端点   基于字符串的java图像加载   Java中的启发式算法,计算8个谜题状态的线性冲突   java为什么不支持文件。probeContentType返回null   JPA@EntityListeners、@PrePersist和Spring@RepositoryEventHandler、@HandleBeforeSave之间的java差异   可能前缀的Java字符串到字符串[]   安装rJava | Makefile时发生java错误。全部:38:target’libjri的配方。所以他失败了   Java公共静态void main()   java如何覆盖txt文件中的某些单词   java如何获得循环中生成的字符值之和?   java Log4j创建另一个具有相同属性的appender   java如何在从Axis2 Web服务客户端通过代理服务器调用Web服务时设置代理设置?   在Windows上安装Elasticsearch时发生java错误   java如何向EditText组件添加TextChangedListener?