intelmq.bots.collectors.twitter package — intelmq 3.0.0.alpha.1 documentation

# intelmq.bots.collectors.twitter package

## Submodules

## intelmq.bots.collectors.twitter.collector_twitter module

Twitter Collector Bot

Extracts tweet_text from tweets and follows urls in supported_sources. Url text and tweet text are sent separately.

param feed - feed name

type feed - feed name

  Twitter

param tweet_count

  int default 20

param target_timelines

  comma separated screen_names of users whose timelines are followed

param follow_urls

  comma separated screen_names of tweeters for which it is allowed to follow urls, currently extraction only from pastebin is supported

param include_rts

  bool default False (include retweets)

param exclude_replies

  bool default True

param timelimit

  int default 84400s, how far to the past do we accept tweets?

param Api login data

  consumer_key consumer_secret access_token_key access_token_secret

To get api login data see: https://python-twitter.readthedocs.io/en/latest/getting_started.html

`intelmq.bots.collectors.twitter.collector_twitter.` `BOT`

  alias of `intelmq.bots.collectors.twitter.collector_twitter.TwitterCollectorBot`

class `intelmq.bots.collectors.twitter.collector_twitter.` `TwitterCollectorBot`(bot_id: str, start: bool = False, sighup_event=None, disable_multithreading: Optional[bool] = None)

  Bases: `intelmq.lib.bot.CollectorBot`, `intelmq.lib.mixins.http.HttpMixin`

  Collect tweets from given target timelines

  `access_token_key`: str = ''
  `access_token_secret`: str = ''
  `consumer_key`: str = ''
  `consumer_secret`: str = ''
  `default_scheme`: str = 'http'
  `exclude_replies`: bool = False
  `follow_urls`: str = ''
  `get_text_from_url`(url: str) → str
  `include_rts`: bool = True
  `init`()
  `process`()
  `target_timelines`: str = ''
  `timelimit`: int = 86400
  `tweet_count`: int = 20

## Module contents