this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix for since_id bug, closes #57

+20 -7
+1 -4
twitter_to_sqlite/cli.py
··· 233 233 @click.option( 234 234 "--since", 235 235 is_flag=True, 236 - default=False, 237 236 help="Pull tweets since last retrieved tweet", 238 237 ) 239 - @click.option( 240 - "--since_id", type=str, default=False, help="Pull tweets since this Tweet ID" 241 - ) 238 + @click.option("--since_id", type=str, help="Pull tweets since this Tweet ID") 242 239 def user_timeline( 243 240 db_path, 244 241 identifiers,
+19 -3
twitter_to_sqlite/utils.py
··· 213 213 last_since_id = max_seen_id 214 214 if since_type_id is not None and since_key is not None: 215 215 db["since_ids"].insert( 216 - {"type": since_type_id, "key": since_key, "since_id": max_seen_id,}, 216 + { 217 + "type": since_type_id, 218 + "key": since_key, 219 + "since_id": max_seen_id, 220 + }, 217 221 replace=True, 218 222 ) 219 223 if stop_after is not None: ··· 366 370 367 371 # Tables for tracking --since 368 372 if "since_ids" not in table_names: 369 - db["since_id_types"].create({"id": int, "name": str,}, pk="id") 373 + db["since_id_types"].create( 374 + { 375 + "id": int, 376 + "name": str, 377 + }, 378 + pk="id", 379 + ) 370 380 db["since_id_types"].insert_all( 371 381 [{"id": id, "name": name} for name, id in SINCE_ID_TYPES.items()] 372 382 ) ··· 378 388 379 389 # Tables for recording history of user follower counts etc 380 390 if "count_history" not in table_names: 381 - db["count_history_types"].create({"id": int, "name": str,}, pk="id") 391 + db["count_history_types"].create( 392 + { 393 + "id": int, 394 + "name": str, 395 + }, 396 + pk="id", 397 + ) 382 398 db["count_history_types"].insert_all( 383 399 [{"id": id, "name": name} for name, id in COUNT_HISTORY_TYPES.items()] 384 400 )