[twitter] allow to unofficially follow users
This commit is contained in:
parent
644f1ed4b0
commit
1afbb241da
2 changed files with 14 additions and 11 deletions
|
|
@ -20,7 +20,6 @@
|
|||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.capabilities.messages import Message
|
||||
from weboob.capabilities.collection import Collection
|
||||
from .pages import LoginPage, LoginErrorPage, ThreadPage, TwitterBasePage, Tweet
|
||||
|
||||
|
||||
|
|
@ -33,7 +32,7 @@ class TwitterBrowser(LoginBrowser):
|
|||
thread_page = URL(u'(?P<user>.+)/status/(?P<_id>.+)', ThreadPage)
|
||||
login_error = URL(u'login/error.+', LoginErrorPage)
|
||||
tweet = URL(u'i/tweet/create', Tweet)
|
||||
twitter_page = URL(u'(?P<path>.+)', TwitterBasePage)
|
||||
twitter_page = URL(u'(?P<path>.+)/with_replies', TwitterBasePage)
|
||||
login = URL(u'', LoginPage)
|
||||
|
||||
def do_login(self):
|
||||
|
|
@ -97,10 +96,5 @@ class TwitterBrowser(LoginBrowser):
|
|||
|
||||
return thread
|
||||
|
||||
def get_collections(self):
|
||||
if self.username:
|
||||
me = self.get_me()
|
||||
yield Collection([me], me)
|
||||
|
||||
def get_tweets_from_collection(self, path):
|
||||
return self.twitter_page.go(path=path).iter_threads()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue