Coder Social home page Coder Social logo

edoardottt / twitterbot2 Goto Github PK

View Code? Open in Web Editor NEW
55.0 3.0 9.0 754 KB

Like and retweet your tweets, or search tweets by topic. It stores and serves data with a Flask webapp. ๐Ÿฆ Live demo running on twitter.com/ai_testing

Home Page: https://edoardoottavianelli.it

License: GNU General Public License v3.0

Python 74.63% Shell 1.64% HTML 13.81% CSS 4.20% JavaScript 5.71%
twitter twitter-bot twitter-api twitterbot twitter-client bot bots tweets tweet-analysis tweet retweet retweet-bot automation python real-time bot-api bot-application flask flask-app hacktoberfest

twitterbot2's People

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

Watchers

 avatar  avatar  avatar

twitterbot2's Issues

CSV output

Maybe provide a way to extract data into CSV ?

Add api endpoints

Something like:

  • HOST/api/users/<username>
  • HOST/api/followers/<username>
  • HOST/api/likes/<username>
  • HOST/api/tweets/<username>
  • HOST/api/retweets/<username>

HTML output

Maybe provide a way to extract data into HTML ?

Add uptime and status info

It would be good to have an uptime value, the status could be just a circle: green if the thread is running, red if the thread is not running

Unable to run any search

hi,
When I attempt to run any of the options, (eg python twitterbot2.py -t = '@ikoworske'), I receive below error message. Could there be something that I am missing?

Traceback (most recent call last):
File "C:\Util\Environments\twitterbot2\twitterbot2.py", line 578, in
main()
File "C:\Util\Environments\twitterbot2\twitterbot2.py", line 539, in main
bot = create_bot(logger)
File "C:\Util\Environments\twitterbot2\twitterbot2.py", line 103, in create_bot
if secretss["access_token"] is None or secretss["access_token_secret"] is None:
TypeError: string indices must be integers

ValueError: Unrecognised argument(s): encoding

If twitterbot2 gives you this error:

$> python3 twitterbot2.py -h
Traceback (most recent call last):
  File "http://twitterbot2.py", line 668, in <module>
    main()
  File "http://twitterbot2.py", line 581, in main
    format=http://globals.bot_user + ": %(levelname)s:%(asctime)s | %(message)s",
  File "/Library/Frameworks/Python.framework/Versions/3.x/lib/python3.x/logging/__init__.py", line 1919, in basicConfig
    raise ValueError('Unrecognised argument(s): %s' % keys)
ValueError: Unrecognised argument(s): encoding

The problem is at this line and you have two solutions:

  • Upgrade python to version 3.9
  • OR
  • Edit your twitterbot2.py file deleting the basicConfig method and use instead:
root_logger= logging.getLogger(__name__)
root_logger.setLevel(logging.INFO)
handler = logging.FileHandler('twitterbot2.log', 'a', 'utf-8')
handler.setFormatter(logging.Formatter(globals.bot_user + ": %(levelname)s:%(asctime)s | %(message)s"))
root_logger.addHandler(handler)

Set correct chart width when refresh

When the page is refreshed the width value of the chart is not set anymore to the previous value. For example if I set the chart width to 70% and then I refresh the page or the page refresh itself, the chart width will be set to the standard value.

Maybe local storage? session storage?

Logger error

I tried to install your twitterbot using python 3.9 and 3.10 and i have the same issue. I installed the requirements.txt and everything was fine and updated the globals.oy as it is mentionned.

You can see what happened on the screenshot.

Note : I tried to give the keyword with and without the " but I have the same issue.

image

Web service showing real time usage ?

It could be useful to serve data on a port (like 8000 ?) and just connect to ip:port to see if the bot is running, how many followers it has, which tweets it's liking and retweeting...

Send a telegram message when the bot dies

The idea could be:

  • If (and only if) the Telegram tokens/secrets are set start a new thread (called 'telegram')
  • Periodically check the status of the thread with the name 'bot'
  • If is not active send a message

Please contact me

Please contact me !

WhatsApp : +33768687583
Twitter : @genidumal

I need a Twitter tool, I want to know if you are able to do it ($$$$)

Retweeting my own retweets

My twitter account is empty. I started the bot using a keyword. So it liked and reweeted some tweets. Then after a few moments, it started to tell me that it was liking and retweeting my own tweets...! I don't know if that's a "chosen feature" but it seems to be an unwanted one ! I hope I was clear.

JSON output

Maybe provide a way to extract data into JSON ?

Data Visualization errors correct handling

  • When there aren't data for the current day, the server shows an error page saying there aren't data for today.
    The correct behaviour should be: Don't show the today's data section, just show the chart.

[APIv2.0] the statistics remain at zero. not working

Hello, first of all thanks for the work (I wrote to you last night)

  1. I have tried countless times but no tweets, followers from message boards are being picked up. I tried both making new tweets a) on the manager account's wall and b) on the bot's wall.
    The two accounts (manager and bot) are linked. I entered all credentials as described in your guide.

Now,

  • or I didn't understand how the system works,
  • -or are the API (ON TWITTER) limited? ( I'm using the basic version of the API on default project)

This my example commands:

  • python3 twitterbot2.py -t
  • python3 twitterbot2.py -nu -k soccer
  1. Also didn't understand if multiple users can be followed. I also did some tests by manually inserting new users into the database.db file.

  2. In any case, in the globals.py file I have inserted the 2 connected twitter accounts.
    On the command line, the response is always thiS:

INFO:2023-05-17 02:37:53,563 | Today tweets count: 0
INFO:2023-05-17 02:37:53,563 | Today likes count: 0
INFO:2023-05-17 02:37:53,563 | Today retweets count: 0
INFO:2023-05-17 02:37:53,563 | Followers count: 0
 * Serving Flask app 'server'
 * Debug mode: off
ERROR:2023-05-17 02:37:53,718 | [Errno 104] Connection reset by peer
INFO:2023-05-17 02:37:53,718 | Sleeping for five minutes.
INFO:2023-05-17 02:42:53,810 | Sleeping for one minute.
ERROR:2023-05-17 02:46:04,645 | [Errno 104] Connection reset by peer
INFO:2023-05-17 02:46:04,645 | Sleeping for five minutes.
ERROR:2023-05-17 02:51:04,876 | [Errno 104] Connection reset by peer
INFO:2023-05-17 02:51:04,877 | Sleeping for five minutes.

Thank, again, for the work

Increase mobile width

When the website is shown on a smartphone the width of the body seems 70-80%.
It should be full screen

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.