this repo has no description
0
fork

Configure Feed

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

Handle blank tweet[source], closes #44

+9 -7
+6 -6
tests/test_save_tweets.py
··· 244 244 "retweeted_status": None, 245 245 "quoted_status": None, 246 246 "place": "01a9a39529b27f36", 247 - "source": "95f3aaaddaa45937ac94765e0ddb68ba2be92d20", 247 + "source": None, 248 248 "truncated": 0, 249 249 "display_text_range": "[45, 262]", 250 250 "in_reply_to_status_id": "1169079390577320000", ··· 318 318 source_rows = list(db["sources"].rows) 319 319 assert [ 320 320 { 321 - "id": "942cfc2bf9f290ddbe3d78f1907dc084a00ed23f", 322 - "name": "Vox Media", 323 - "url": "http://www.voxmedia.com", 324 - }, 325 - { 326 321 "id": "95f3aaaddaa45937ac94765e0ddb68ba2be92d20", 327 322 "name": "Twitter for iPhone", 328 323 "url": "http://twitter.com/download/iphone", 324 + }, 325 + { 326 + "id": "942cfc2bf9f290ddbe3d78f1907dc084a00ed23f", 327 + "name": "Vox Media", 328 + "url": "http://www.voxmedia.com", 329 329 }, 330 330 { 331 331 "id": "1f89d6a41b1505a3071169f8d0d028ba9ad6f952",
+1 -1
tests/tweets.json
··· 365 365 } 366 366 ] 367 367 }, 368 - "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", 368 + "source": "", 369 369 "in_reply_to_status_id": 1169079390577320000, 370 370 "in_reply_to_status_id_str": "1169079390577319937", 371 371 "in_reply_to_user_id": 82016165,
+2
twitter_to_sqlite/utils.py
··· 620 620 621 621 622 622 def extract_and_save_source(db, source): 623 + if not source: 624 + return None 623 625 m = source_re.match(source) 624 626 details = m.groupdict() 625 627 return db["sources"].insert(details, hash_id="id", replace=True).last_pk