mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-19 00:40:42 -06:00
Migrated support to Trending Topics
This commit is contained in:
parent
cdc285e362
commit
52154ac271
@ -1134,9 +1134,9 @@ class trendsBufferController(baseBuffers.buffer):
|
|||||||
if self.execution_time == 0 or current_time-self.execution_time >= 180 or mandatory == True:
|
if self.execution_time == 0 or current_time-self.execution_time >= 180 or mandatory == True:
|
||||||
self.execution_time = current_time
|
self.execution_time = current_time
|
||||||
try:
|
try:
|
||||||
data = self.session.call_paged("get_place_trends", id=self.trendsFor)
|
data = self.session.twitter.trends_place(id=self.trendsFor)
|
||||||
except:
|
except TweepError as err:
|
||||||
return
|
log.error("Error %s: %s" % (err.api_code, err.reason))
|
||||||
if not hasattr(self, "name_"):
|
if not hasattr(self, "name_"):
|
||||||
self.name_ = data[0]["locations"][0]["name"]
|
self.name_ = data[0]["locations"][0]["name"]
|
||||||
self.trends = data[0]["trends"]
|
self.trends = data[0]["trends"]
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
|
||||||
from builtins import object
|
|
||||||
from wxUI.dialogs import trends
|
from wxUI.dialogs import trends
|
||||||
import widgetUtils
|
import widgetUtils
|
||||||
|
|
||||||
@ -10,7 +8,7 @@ class trendingTopicsController(object):
|
|||||||
self.countries = {}
|
self.countries = {}
|
||||||
self.cities = {}
|
self.cities = {}
|
||||||
self.dialog = trends.trendingTopicsDialog()
|
self.dialog = trends.trendingTopicsDialog()
|
||||||
self.information = session.twitter.get_available_trends()
|
self.information = session.twitter.trends_available()
|
||||||
self.split_information()
|
self.split_information()
|
||||||
widgetUtils.connect_event(self.dialog.country, widgetUtils.RADIOBUTTON, self.get_places)
|
widgetUtils.connect_event(self.dialog.country, widgetUtils.RADIOBUTTON, self.get_places)
|
||||||
widgetUtils.connect_event(self.dialog.city, widgetUtils.RADIOBUTTON, self.get_places)
|
widgetUtils.connect_event(self.dialog.city, widgetUtils.RADIOBUTTON, self.get_places)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user