Skip to content

Instantly share code, notes, and snippets.

@ApOgEE
Created January 22, 2021 15:23
Show Gist options
  • Save ApOgEE/ba54fc28c666492a7a04564715d5bcbc to your computer and use it in GitHub Desktop.
Save ApOgEE/ba54fc28c666492a7a04564715d5bcbc to your computer and use it in GitHub Desktop.
Twint DB testing Script
import twint
import os
'''
twint_test.py - Twint DB testing Script
'''
def test_db(c, run):
print("[+] Beginning DB test in {}".format(str(run)))
c.Database = "test_twint.db"
run(c)
def main():
c = twint.Config()
c.Username = "apogee"
c.Limit = 20
c.Store_object = True
runs = [
twint.run.Profile, # this doesn't
twint.run.Search, # this works
twint.run.Following,
twint.run.Followers,
twint.run.Favorites,
]
for run in runs[:3]:
if run == twint.run.Search:
c.Since = "2016-1-1 20:30:22"
c.Until = "2021-1-1"
else:
c.Since = ""
c.Until = ""
test_db(c, run)
print("[+] Testing complete!")
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment