my.twitter.twint: use dict row factory instead of sqlite Row
otherwise it's not json serializable
This commit is contained in:
parent
79eeab2128
commit
9db5f318fb
1 changed files with 2 additions and 2 deletions
|
@ -109,13 +109,13 @@ ORDER BY T.created_at
|
||||||
|
|
||||||
|
|
||||||
def tweets() -> Iterator[Res[Tweet]]:
|
def tweets() -> Iterator[Res[Tweet]]:
|
||||||
with sqlite_connection(get_db_path(), immutable=True, row_factory='row') as db:
|
with sqlite_connection(get_db_path(), immutable=True, row_factory='dict') as db:
|
||||||
res = db.execute(_QUERY.format(where='F.tweet_id IS NULL'))
|
res = db.execute(_QUERY.format(where='F.tweet_id IS NULL'))
|
||||||
yield from map(Tweet, res)
|
yield from map(Tweet, res)
|
||||||
|
|
||||||
|
|
||||||
def likes() -> Iterator[Res[Tweet]]:
|
def likes() -> Iterator[Res[Tweet]]:
|
||||||
with sqlite_connection(get_db_path(), immutable=True, row_factory='row') as db:
|
with sqlite_connection(get_db_path(), immutable=True, row_factory='dict') as db:
|
||||||
res = db.execute(_QUERY.format(where='F.tweet_id IS NOT NULL'))
|
res = db.execute(_QUERY.format(where='F.tweet_id IS NOT NULL'))
|
||||||
yield from map(Tweet, res)
|
yield from map(Tweet, res)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue