Closed LuD1161 closed 5 years ago
Hi @LuD1161 and thank you for reporting this!
@andytnt what do you think?
I think that we could edit this blocks https://github.com/twintproject/twint/blob/a76bc07d7c28fb13334564e4f453cd9c07afc294/twint/output.py#L84-L107 by indenting from https://github.com/twintproject/twint/blob/a76bc07d7c28fb13334564e4f453cd9c07afc294/twint/output.py#L92
So that the if copyright is None and is_tweet(tweet)
statement is already evaluated and we do not have to re-evaluate again
@pielco11 Yup, that looks better :+1:
@LuD1161 feel free to try and let me know if you still get errors somehow. I'm going to close this, feel free to re-open in case of new errors related to this issue
First of all a lot of thanks for making this tool, it's great and has helped me a lot.
BUG
Description of Issue
When a hidden tweet is encountered, the output shows as
[x] Hidden tweet found, account suspended due to violation of TOS
and that's fine but when the same is used for writing it to sqlite3 database it shows an error
can only join an iterable
pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
;Command Ran
Environment Details
Linux Ubuntu 18.04
Possible Solution
Looking into the code I found that it was because SQLite was trying to join
None
as the tweet data didn't contain anything butAs you can see here :
Initially, I thought of adding just one more check in the
try-catch
exception clause in thetwint/storage/db.py
here forTypeError
and it helps.However I think it would effect others too, like for
elasticsearch
etc, so it would be better if there's the copyright check here here also Like this :It solves the problem, let me know if there's more to be done.
P.S.
Here's the diff on my fork