新加坡食物需求图书馆

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 MIMessage附件   java试图从JSON数组向数据库插入数据   铸造java。util。ArrayList无法转换为java。util。矢量   在到达末尾后从头开始读取csv文件(Java、OpenCSV)   Java swing如何在另一个线程中打开框架   java如何为集合正确编写此比较器。排序(arrayList、comparator)?   JavaOOD将配置传递给外部类的最佳方式   java不确定如何使用switch语句从main()调用要运行的方法   java循环菜单以在选择后显示   java将位置对象转换为地址(谷歌地图)   java Hazel cast客户端端口问题   使用JarJar重新打包工具的java   使用Java Netscape目录LDAP API和二进制筛选器值   java如何从Google App Engine下载应用程序源文件   java如何居中javafx场景图“摄影机”   java调用servlet而不提交并停留在同一个JSP页面中   将文本文件加载到HashMap<Integer,List<String>>java中   JavaFX平台。重新加载站点后运行更高版本()