Skip to content

Finding and flagging spam accounts based off of Twitter activity

Notifications You must be signed in to change notification settings

brylee123/Twitter-Spam-Bot-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter-Spam-Bot-Detector

Scenario:

You have access to platform's activity log (available at /home/candidate/candidate_files/py/inputs).

The structure of the activity log is described in /home/candidate/candidate_files/py/log-structure.txt

We consider am user to be a spammer if it satisfies all the following criteria:

  • The user has no original tweets.
  • The user has at least one retweet.
  • All the retweets of this user occur within 1000 milliseconds of the original tweet.

Task:

Write the function identify_spammers that accepts the absolute path of the activity logfile, and returns a list of all the spammer usernames.

Additional requirements:

  • In the corner case where the retweet occurs exactly 1000 milliseconds after the original tweet, it should also be considered as a spam retweet.
  • The output list must not contain duplicates.
  • The order of the output list does not matter.

Assumptions:

  • The log_path supplied to the identify_spammers function is guaranteed to point to a file that exists, and can be read.
  • All entries in the activity log are chronologically ordered.

About

Finding and flagging spam accounts based off of Twitter activity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages