Skip to content

Commit

Permalink
bugfix:缓存了订餐数据
Browse files Browse the repository at this point in the history
  • Loading branch information
wujiyu115 committed Mar 6, 2017
1 parent e7904d0 commit 43f515a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @Author: wujiyu
# @Date: 2017-02-26 22:49:03
# @Last Modified by: wujiyu
# @Last Modified time: 2017-03-03 17:23:00
# @Last Modified time: 2017-03-06 16:40:34
import requests
import logging
# requests.packages.urllib3.disable_warnings()
Expand Down
5 changes: 1 addition & 4 deletions src/meican.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ def mc_time(self):
return mc_time_info

def calendar_items(self):
if not hasattr(self, "_calendar"):
calender_url = calender_items_url()
self._calendar = json.loads(self.get(calender_url).content)
return self._calendar
return json.loads(self.get(calender_items_url()).content)

def get_restaurants(self, tab):
return json.loads(self.get(restaurants_url(tab)).content)['restaurantList']
Expand Down

0 comments on commit 43f515a

Please sign in to comment.