mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-19 08:41:06 -06:00
Implemented support to list buffer creation
This commit is contained in:
parent
4643301764
commit
cdc285e362
@ -22,6 +22,7 @@ from controller.buffers import baseBuffers
|
|||||||
from sessions.twitter import compose, utils
|
from sessions.twitter import compose, utils
|
||||||
from mysc.thread_utils import call_threaded
|
from mysc.thread_utils import call_threaded
|
||||||
from tweepy.error import TweepError
|
from tweepy.error import TweepError
|
||||||
|
from tweepy.cursor import Cursor
|
||||||
from pubsub import pub
|
from pubsub import pub
|
||||||
from sessions.twitter.long_tweets import twishort, tweets
|
from sessions.twitter.long_tweets import twishort, tweets
|
||||||
|
|
||||||
@ -737,13 +738,9 @@ class listBufferController(baseBufferController):
|
|||||||
super(listBufferController, self).start_stream(mandatory, play_sound, avoid_autoreading)
|
super(listBufferController, self).start_stream(mandatory, play_sound, avoid_autoreading)
|
||||||
|
|
||||||
def get_user_ids(self):
|
def get_user_ids(self):
|
||||||
next_cursor = -1
|
for i in Cursor(self.session.twitter.list_members, list_id=self.list_id, include_entities=False, skip_status=True).items():
|
||||||
while(next_cursor):
|
if i.id not in self.users:
|
||||||
users = self.session.twitter.get_list_members(list_id=self.list_id, cursor=next_cursor, include_entities=False, skip_status=True)
|
self.users.append(i.id)
|
||||||
for i in users['users']:
|
|
||||||
if i["id"] not in self.users:
|
|
||||||
self.users.append(i["id"])
|
|
||||||
next_cursor = users["next_cursor"]
|
|
||||||
|
|
||||||
def remove_buffer(self, force=False):
|
def remove_buffer(self, force=False):
|
||||||
if force == False:
|
if force == False:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user