mrbellek / twitterbot Goto Github PK
View Code? Open in Web Editor NEWSeveral PHP scripts for making Twitter bots that retweet certain terms, or post from a data source (rss, database, markov body, picture folder).
License: Other
Several PHP scripts for making Twitter bots that retweet certain terms, or post from a data source (rss, database, markov body, picture folder).
License: Other
Convert single-purpose/dstbot.php to OO. Should end up in oo/dstnotify.{php|json|inc.php}.
Are there any free solutions for hosting a PHP bot script? I know about hosting a node.js bot on Heroku, but I'm not sure if Heroku is a good fit for a PHP script. Any suggestions?
this file is missing ... called by logger.php
Hi,
First, Thank you for this amazing app.
In my code, I specefied a json file with this command: sSettingsFile
but the problem is, it doesn't read it properly, for example:
in the filter section in my json file I have:
"filters": [
"t.co", "goo.gl" ,"http", "https",".com",".net",
],
and other words,, but it still showing tweets with those words..
In dice section I have:
"dice": {
"media": 1.0,
"urls": 0.0,
"mentions": 0.0,
"base": 0.7
}
but I can clearly see links and mentions after executing my app
If I have to add something, I duplicated the retweetbot example and used it, I only changed the words and data in the json file and the main php file.
Old script: single-purpose/holidaysbot.php
New scripts: oo/holidaysbot.{php|json|inc.php}
This bot pulls data from the database (thank god) and attaches semi-random results from Google Image Search to tweets.
Old script: single-purpose/exactotweet.php
New scripts: oo/exactotweet.{php|json|inc.php}
Note that this bot quotes tweets in its timeline (i.e. quotes its followers), allow_mentions should be true.
The logger page has zero documentation, and throws an unclear error when you open it without setting an .inc file for database access. It should show a clear message indicating the user what to do, and the Github documentation should include a section on what the page does and how it works.
When a tweet var field is filled with something that can be attached as a picture/clip, and it has no more content behind the link beyond what is in the attachment (single picture imgur gallery, direct picture link, gifv link etc), it should not be included in the tweet.
This saves characters and prevents useless links in the tweet.
To prevent bots from accidentally tagging someone on twitter who didn't ask for it (against the Twitter ToS) because output pulled from the db or rss feed contains a @.
Implement a setting $allow_mentions that's false by default and gets checked after a tweet has been composed, and escapes any @-s with a / or .
Bots that reply to mentions should set this to true (e.g. DSTnotify).
It would be a nice feature if we could turn off screen output i.e. echo 'Getting blocked users..
';
This could be controlled via a variable within the inc file.
Thanks for the work on this.
Reddit allow users to post multiple images in a post. This results in the media link to be something like 'reddit.com/gallery/tvptpt', but the media module displays this as 'crosslink' and will not attach the pictures. The module must be updated to properly detect a gallery, pick up to 4 random pictures from it, and attach those to the tweet.
This was implemented earlier for posts that linked to Imgur galleries, but since Reddit has implemented their own version of galleries, those aren't used anymore.
lol
Using the json filter file:
"filters": [
"#alternative",
"blockchain",
"gaming"
],
Hoping this will exclude tweets with the hashtag #alternative kind of works.
However, it also excludes #alternativemusic or #alternativeclothing
Is there a way to make the match more exact.
Thanks
Manually loading lib/db when needed is getting out of hand. Since a bot can not use the db but use the logger that does, I used to load the db in the logger lib when it wasn't already, but that messes up all sorts of things.
Change so that db lib is loaded in lib/base so all libs have access to it, including lib/logger.
Google emailed me on March 23rd:
The Custom Search Element API 1.0, which was deprecated in 2012 in favor of API 2.0, is now no longer maintained. API 1.0 may experience outages and failures, and possibly stop working entirely.
You’re receiving this message because our records show you might currently be using the Custom Search Element API 1.0. You can confirm if you’re using this version by looking at the code on your search page for a call to google.search.CustomSearchControl.
Next Steps
To avoid any potential interruptions in service, please update your website to use the Custom Search Element API 2.0. The easiest way to transition is through the CSE Control Panel at cse.google.com, where you can generate your new Custom Search Engine code and add it to your website.
The logview page has some problems:
I moved away from the old oauth/twitteroauth.php scripts because of this issue, but still can't get it to work. Usually twitter returns 'invalid media type'.
There is a .json setting that specifies if the content of a tweet var should be attached to the tweet, if possible. It's not being used - right now the function that checks redditmediatype (either in lib/format or lib/media, not sure off the top of my head) determines if it's going to try and attach the content.
This is probably the last piece of code in here that hasn't changed from the original source I forked from. It's really outdated, didn't support media upload (which I added) and is formatted like a blind moose.
Start using the abraham/twitteroauth lib that's actively maintained, and can probably upload movie clips and gifs/webm/gifv to boot.
Old script: single-purpose/unicodebot.php
New scripts: oo/unicodetweet.{php|json|inc.php}
Bot posts random unicode characters with their descriptions. Note that single-purpose/unicode.json is used.
The function that specifies which characters are smileys/emojis should probably be moved to a .json setting block.
Hello,
Firstly, thank you for the job you made for this tool, it is very useful for people who have only an intermediary level in PHP (as I am).
I would like to ask for an enhancement about the Picture bot's script. It works well but it is still very rough concerning the tweet text content which is associated with the pictures. It is especially currently impossible to add any links, which would be very useful to mention the sources of the files, or to mention a webpage associated with the topic of the pictures.
That's why it would be very useful to have an option to declare a JSON file in which the bot could fetch extra informations to add to the tweets. (JSON files are better than database in this case, in my opinion, because it is very light and easily editable).
Thank you in advance !
Uh ok
Check out @commandertuna’s Tweet: https://twitter.com/commandertuna/status/1060385196388900865?s=09
When someone retweets the same content, say 3 times, is it possible to prevent the retweet bot retweeting all three posts ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.