Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot filter retweets #13

Open
faeinthebay opened this issue Mar 4, 2017 · 5 comments
Open

Cannot filter retweets #13

faeinthebay opened this issue Mar 4, 2017 · 5 comments

Comments

@faeinthebay
Copy link

Although the Python twitter API supports filtering out retweets, it is not currently possible to filter them in this utility. I suspect users (including myself) use the user argument to download photos posted by twitter users and might not care about retweeted photos that are not originally theirs.

@faeinthebay
Copy link
Author

I have fixed this on my own branch, but it has slightly deviated from the original codebase, so it cannot be easily merged. Fortunately the changed are simple to replicate, here is the relevant commit: faeinthebay@653cebe

I missed some documentation which I fixed in another commit. I apologize for not offering a clean pull request, I'm still learning Git and good practices. Thanks for your time!

@faeinthebay
Copy link
Author

I should also note that I have conducted basic tests on my fork and have found no issues including and excluding retweets.

@arcantuba
Copy link

i get an error after using the filter retweet option "unrecognized arguments: -w". I did editing the codes correctly from what you provided, so what did it go wrong in my case?

@quentinwolf
Copy link

I have fixed this on my own branch, but it has slightly deviated from the original codebase, so it cannot be easily merged. Fortunately the changed are simple to replicate, here is the relevant commit: andrew-ledawson@653cebe

I missed some documentation which I fixed in another commit. I apologize for not offering a clean pull request, I'm still learning Git and good practices. Thanks for your time!

Thank you so much Andrew. I came across twphotos and was so happy to be able to mirror entire accounts, but upon discovering retweets were being saved as well, it was a huge disappointment, as some twitter accounts contain more retweets than original posts, and thus the original downloads of said account were tainted by random other images from other accounts.

I've successfully merged your code and tested it, and it's working great. Thank you so much for the contribution!

I've went so far as to make a batch script that reads a txt file that lists a username on each new line, which it parses and runs the command per username. (along with twitter-dl to snatch video posts.) A function like this would be great is to be able to do this without having to close and restart the connection to twitter (thus hitting the twitter api limitation as quickly.) Although that's well out of my coding experience with Python, so I just parse 30-40 accounts to each txt file when updating, as the API resets every 15 minutes.

@egodenovo
Copy link

I also get the same error when attempting to use the retweet filter option:
usage: twphotos [options]
twphotos: error: unrecognized arguments: -w

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants