Git Product home page Git Product logo

twitter-contest-js-bot's People

Contributors

henhouse avatar raulrene avatar sjmakin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitter-contest-js-bot's Issues

More SEARCH_QUERIES: or FILTERS: maybe?

Well I looked into different Twitter contest bots and I think we could add more filters into this one by default hm?

Stuff I added for mine(it's from the python bot I think):
```
'#giveaway',
'Retweet and win',
'retweet and you could win',
'rt for your chance to win',
'#giveawayalert',
'win rt',
'#rttowin',
'#sweepstakes'

Tweeting Too Fast

Apparently Twitter decided that my app was a spam bot because of too much tweeting so decided to shut it down.

So anyways, I hope that as we keep trying to improve the filters for this app it won't run into this problem in the future.

Maybe we should consider slowing down the rate that it retweets at, plus the geo-filtering to reduce the amount of material, as well as better filters against useless retweets.

Only searching and nothing else

The bot seem to only be searching none stop but not doing anything else.
It would time out and wait 10 minutes, then keep searching again

Here's my config

const config = {

/* These are your twitter developer authentication details. Get them at https://apps.twitter.com/ */
auth: {
    consumer_key: '-',
    consumer_secret: '-',
    token: '---',
    token_secret: '-'
},

// The searches the bot will do
SEARCH_QUERIES: [
   'retweet to win',
    'RT to win',
    'retweet 2 win',
    'RT 2 win'
],

// Appended at the end of search queries to filter out some data
SEARCH_QUERY_FILTERS: ' -vote -filter:retweets',

// Filter out tweets containing any phrases you want - just add them as strings in the array
POST_SEARCH_FILTERS: [],

// Allow searching by location. A Valid geocode has the form "lat long radius_in_miles"
// Example: '37.781157 -122.398720 1mi'
SEARCH_BY_GEOCODE: '',

// 'Specifies what type of search results you would prefer to receive. The current default is “mixed.” Valid values include:'
// Default: 'recent'   (return only the most recent results in the response)
//          'mixed'    (Include both popular and real time results in the response)
//          'popular'  (return only the most popular results in the response)
RESULT_TYPE: 'recent',

// Minimum amount of retweets a tweet needs before we retweet it.
// - Significantly reduces the amount of fake contests retweeted and stops
//    retweeting other bots that retweet retweets of other bots.
// Default: 10
MIN_RETWEETS_NEEDED: 10,

// Maximum amount of tweets a user can have before we do not retweet them.
// - Accounts with an extremely large amount of tweets are often bots,
//    therefore we should ignore them and not retweet their tweets.
// Default: 20000
//          0 (disables)
MAX_USER_TWEETS: 20000,

// If option above is enabled, allow us to block them.
// - Blocking users do not prevent their tweets from appearing in search,
//    but this will ensure you do not accidentally retweet them still.
// Default: false
//          true (will block user)
MAX_USER_TWEETS_BLOCK: false,

// 10 minutes timeout for limit exceeded
RATE_LIMIT_EXCEEDED_TIMEOUT: 1000 * 60 * 10,

// 15 seconds timeout for Retweets
RETWEET_TIMEOUT: 1000 * 15,

// 30 seconds for Search Timeout
RATE_SEARCH_TIMEOUT: 1000 * 30,

// Array of preferred accounts. If set, it only filters tweets from these accounts. Example: ['user1', 'user2']
PREFERRED_ACCOUNTS: []

};

module.exports = config;

tweet

The API is missing a tweet endpoint (function), for sending tweets

Bot stops retweeting after a while

If you let it run for a while, it eventually just completely stops retweeting and just scrapes for new tweets forever without doing anything with them.

Re-write app in ES6

Re-writing the app will have more benefits:

  • improve code organization
  • use native JS Promises that will simplify the codebase
  • have the codebase in es6
  • simplify configuration options

Retweets keep failing

Keep getting error: [Error] RT Failed for 942658223244480500 . Likely has already been retweeted. Adding to blacklist.
I left it running overnight and it only successfully retweeted 4 tweets. My account has a total of about 20 retweets, so it seems unlikely that all the tweets it checked had already been retweeted. Is there another reason for this error?

last_tweet_id

I'll say how I think this is supposed to work, hopefully I'm thinking right.

var last_tweet_id = 661669688620007400

If you put a tweet id into there, the app will tweet all new tweets until it get to this tweet number, then stop.

I hope that's how it works. If so then it's not working.

The program stops after a while

Can you make it so that the program just waits but keeps running so I don't have to keep restarting it every time it stops?

No Rate Limit

Was messing around with your setup, you don't seem to have a rate limit for the number of retweets you can send (about 300 every 3 hours), this leaves the script bashing against Twitter, trying to retweet (and thinking it has) but being blocked from doing so by the rate limit (separate from search limiting). Any suggestions on how to fix this? I've been going about trying to link the error handler for searching to retweeting as well, but I'm not very good at this yet so not getting to far.

Porn Retweets

I've had several instances where the bot will pick up porn that has been formulated to contain the retweet/win keywords. This is another instance where some better filters will be useful.

Geolocation

I'd prefer to not be entering contests in Sweden, because I won a free lunch at some Swedish restaurant and can't cash in. :(

Any way to geo-filter?

Geocode

Just started using your bot, nice work, like the features!

Can't seem to get the geocode to work, unless it's Twitter side. I am trying to focus searches for just the UK which I have the correct settings for but brings no results.

Am I right in thinking twitter profiles need to have location set for this to work? Most large companies do have this set so I am a little confused.

Thanks.

Searching & Sleeping to search uses %25 cpu

I tried this on W7 64 bit ultimate and W8.1 64 bit.

Same case. It uses %25 of the cpu when searching for tweets, and sleeping to search for tweets. Thats %25 cpu usage, for 1.5-2 min straight, every 10-15 minutes, for a simple script.

You have already retweeted this tweet.

Feel like i am fussy now. But after running for an hour the bot never retweets anything.

Searching for tweets...
Sleeping between searches so we don't trigger rate limit...
Sleeping between searches so we don't trigger rate limit...
Sleeping between searches so we don't trigger rate limit...
Sleeping between searches so we don't trigger rate limit...
Retweeting 806975247337537500
Error! 403 - {"errors":[{"code":327,"message":"You have already retweeted this tweet."}]}
RT Failed for 806975247337537500 . Likely has already been retweeted. Adding to blacklist.
Retweeting 806885195580325900
Error! 403 - {"errors":[{"code":327,"message":"You have already retweeted this tweet."}]}
RT Failed for 806885195580325900 . Likely has already been retweeted. Adding to blacklist.

It just goes on and on and on.

Authentication Error

Error retrieving blocked users: 401 - {"errors":[{"code":32,"message":"Could not authenticate you."}]}

Just running the index.js after installing everythind and editind the config.

Model not defined.

Had this error arise when running node index.js

/opt/app/config.js:1
(function (exports, require, module, __filename, __dirname) { model.exports = {
^

ReferenceError: model is not defined
at Object. (/opt/app/config.js:1:63)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/opt/app/api-functions.js:2:13)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/opt/app/index.js:1:73)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

Not Filtering Retweets

Doesn't seem to be filtering retweets from the to be tweeted results. Again, I'm new and don't know yet why. :(

Searching before exhausting queue

The code definitely seems to make requests before the queue has been fully exhausted. When run, the queue is continually repopulated after attempting to retweet. I will look into the issue and see if I can fix.

Follower De-following

Eventually you'll fill up your allotted following list. Any way to auto de-follow people as you reach a certain amount of follows? Like whenever you follow 1000 people it will unfollow the oldest 100 followers?

Error

twitter-contest-js-bot-master>node index.js
Error retrieving blocked users: 400 - {"errors":[{"code":215,"message":"Bad Authentication data."}]}

Following and Favoriting

I am not sure if the following and favoriting is working right for me. It shows on the console that it is following individuals but when I check twitter the user is not followed. When I spot check some tweets for the term fav they do not show up favorited.

It seems like the favorite and follow lines are rem'd out. I uncommented the favorite and following and it works.

// On success, try to Favorite and Follow
if (searchItem.text.toLowerCase().indexOf("fav") > -1) {
//API.favorite(searchItem.id_str);
console.log("Favorite", searchItem.id);
}
if (searchItem.text.toLowerCase().indexOf("follow") > -1) {
//API.follow(searchItem.user.id_str);
console.log("Follow", searchItem.user.screen_name);
}

                    // Then, re-start the RT Worker
                    retweetWorker();

error 220

Can't get past this part on running:

toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body:
'{"errors":[{"message":"Your credentials do not allow access to this resource","code":220}]}' } }

A way to block specific phrases

Sometimes people have "spam" retweets that follow specific patterns. I know that you can put -keyword into the API.search text field, however can you make a seperate field that you can enter in phrases or keywords you don't want to show up, to clear up the clutter in the section with words that you want to show up.

Following

Hi it seems to have an issue with following contests that require it in the tweet

ES6 issues

Hi,

I've been trying to get the new version working and it's thorwing some issues. Putting a "use strict"; fixed some of them, but then I'm getting a error in api-functions.js:22:

const {text, count = 100, result_type = 'popular', since_id = 0, max_id, geocode} = options;
SyntaxError: Unexpected token {

I would try and fix it myself but I'm new to using Es6 and don't want to break other spects of the bot by trying!

Thanks

Use hashtag

Would be great if the bot could use hashtags when retweeting if it notices this. Many of my retweets require this in addition to the retweet itself. aslo some retweets require "Like comment and retweet."

Blacklist tweets suggestion

Great work I love the versatility of this script but I do have a suggestion would make the bot a bit more effective when searching if it would keep a list of the tweets you already done so it doesn't try to do then repeatly. It can then delete the tweets one the user has been un followed or after x amount of time.

Host on github pages

As github pages supports JS, could this script be hosted on a github project page and work? Saves having to run it on a terminal.

Blocked Accounts Being Refollowed

So I built an extensive block list in order to help cut down on the amount of spam I retweeted, however there seems to be a problem with the way the script handles retweeting blocked accounts.

http://snag.gy/jc1dF.jpg

In this screenshot you can see me retweeting speed_racer420, however I had previously blocked him in order to stop from tweeting his material. The script re-added him to my follow list despite this. Any idea why the block function isn't working?

errCallBack Is not defined.

@raulrene After about 10 mins of it running it stops, with a big error message that starts with "errCallBack Is not defined" I believe this is because it tried to retweet something that it has already retweets, which breaks it, and then I have to manually restart it which is not ideal as I would like to leave this running all the time without having to worry about it, anyway to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.