Coder Social home page Coder Social logo

twitterdelete's Introduction

Some things you should know about life:

twitterdelete's People

Contributors

ashleyconnor avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar mikemcquaid avatar seantallen 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitterdelete's Issues

Install fails

Generates error after bundle install.

"An error occurred while installing unf_ext (0.0.7.4), and Bundler
cannot continue.
Make sure that gem install unf_ext -v '0.0.7.4' succeeds before bundling."

.env file not working

Hi there, thanks for making this open source and sorry this is probably a dumb question.

I put all my api keys into a file called 'secrets.env' in the twitterdelete folder but when i'm running ./twitter_delete.rb --user irl i get environment variable must be set

Should my keys be in plaintext or have quotes around them like normal ruby strings? i tried both and neither worked. Some help with implementation would be appreciated. Thanks so much!

Deprecated gem warning

Ever time I run this (in a macOS terminal) I get the following warning:

[DEPRECATION] This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.

I assume something simply needs to be renamed, but it doesn't actually say which gem got renamed... haha.

Dies with a vast number of Tweets.

Had this happen every time so far. I have a stupidly large number of tweets I want to be rid of, so that's perhaps the cause of the issue. Haven't tried other scripts that use the csv file to delete long-since gone-from-the-maximum-visible-limit tweets, so this might not be entirely the fault of the script. Tried with the system Ruby without luck as well.

I was using another tool before yours', but it couldn't delete past the visible-limit, and it wasn't as up-to-date on the API calls as this one, so I switched.

bundle exec ./twitter_delete.rb --user Dom_T4 --csv tweets.csv --force
...

==> Deleting 57439 tweets
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/rest/request.rb:37:in `rescue in perform': execution expired (Twitter::Error)
    from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/rest/request.rb:32:in `perform'
    from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:51:in `perform_request'
    from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:73:in `perform_request_with_object'
    from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:65:in `perform_post_with_object'
    from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/rest/tweets.rb:100:in `block in destroy_status'
    from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.14.0/lib/twitter/utils.rb:39:in `block (2 levels) in pmap'

Request: Save specific tweet IDs

Making a cheeky request for a feature that allows people to not delete specific tweet IDs. Tried coding something myself, but had little progress so far. My Ruby, as we both know, still sucks ๐Ÿ˜ข. I'll keep reading the Twitter gem documentation and see if I can come up with something that works with the script though.

Support tweet.js

Twitter has started sending a fuller archive, with tweets in a tweet.js file instead of tweets.csv. It's a plain JS object so probably pretty simple to convert to OpenStruct or even regex it.

Old tweets causing error

I'm getting odd errors, presumably from old Tweets the API isn't returning.

/usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/rest/response/raise_error.rb:15:in `on_complete': No status found with that ID. (Twitter::Error::NotFound)
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/response.rb:9:in `block in call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/response.rb:57:in `on_complete'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/response.rb:8:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/request/url_encoded.rb:15:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/request/multipart.rb:14:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/rest/request/multipart_with_file.rb:17:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
        from /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.1/lib/faraday/connection.rb:177:in `post'
        from /usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/rest/request.rb:33:in `perform'
        from /usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:51:in `perform_request'
        from /usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:73:in `perform_request_with_object'
        from /usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:151:in `block in parallel_objects_from_response'
        from /usr/local/lib/ruby/gems/2.3.0/gems/twitter-5.14.0/lib/twitter/utils.rb:39:in `block (2 levels) in pmap'

As a fix (and as a feature I like) I also added a parameter to not delete my oldest tweets (as I like having the very old ones there just to brag my account is in the first handful of ones created)
https://github.com/bobbysteel/TwitterDelete/blob/master/twitter_delete.rb

Incorrect tweet count

When processing an archive file, TwitterDelete comes up with an incorrect tweet count. I think what's happening is tweets from the archive and from the API are being double-counted. The number being reported is approximately 3,000 more than my archive even has.

I'll investigate more, but wanted to file the issue so it wouldn't be lost.

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.