Changeset 17aa9a2
- Timestamp:
- 2015-05-14T14:29:33Z (10 years ago)
- Children:
- 2d88cac4
- Parents:
- b20014b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/implugin.py
rb20014b r17aa9a2 144 144 145 145 # Throw all unread-post hashes in a long list and sort it by posting time. 146 #feed_hashes = r.json()["unread_feed_story_hashes"] 147 wtf = r.json() 148 feed_hashes = wtf["unread_feed_story_hashes"] 146 feed_hashes = r.json()["unread_feed_story_hashes"] 149 147 all_hashes = [] 150 148 for feed, hashes in feed_hashes.iteritems(): … … 160 158 if not req_hashes: 161 159 return 162 print req_hashes163 160 164 161 # Grab post details. … … 168 165 return 169 166 170 # Response is not in the order we requested. :-( 171 wtf = r.json() 172 stories = {} 173 for s in wtf["stories"]: 174 stories[s["story_hash"]] = s 175 167 # Response is not in the order we requested. :-( Make it a hash 168 # and reconstruct order from our request. 169 stories = {s["story_hash"]: s for s in r.json()["stories"]} 176 170 for s in (stories[hash] for hash in req_hashes): 177 171 line = "%(story_title)s <%(story_permalink)s>" % s … … 179 173 self.bee.buddy_msg("rss", line, 0, ts) 180 174 self.seen_hashes.add(s["story_hash"]) 181 print s["story_hash"]182 175 183 176
Note: See TracChangeset
for help on using the changeset viewer.