Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions deletetweets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
import time
import os
import twitter
import json
from dateutil.parser import parse

__author__ = "Koen Rouwhorst"
__version__ = "0.1"
__version__ = "0.2"

def delete(api, date, r):
with open("tweets.csv") as file:
with open("tweet.js") as file:
count = 0

for row in csv.DictReader(file):
tweet_id = int(row["tweet_id"])
tweet_date = parse(row["timestamp"], ignoretz=True).date()
for row in json.load(file):
tweet_id = int(row["id"])
tweet_date = parse(row["created_at"], ignoretz=True).date()

if date != "" and tweet_date >= parse(date).date():
continue
Expand Down