Commit Graph

47 Commits

Author SHA1 Message Date
Tanner 1569c16e70 Fix Better HN api content extraction 2025-02-01 22:39:13 +00:00
Tanner 9f52226d47 Add Better HN as an API backup 2025-02-01 21:42:06 +00:00
Tanner b3eb55e2d1 Bug fixes 2025-02-01 20:31:35 +00:00
Tanner fafed2cf3d Alert on story update error 2024-03-16 20:41:24 +00:00
Tanner 7dc9e3ad16 Adjust score and comment thresholds 2024-03-08 03:08:18 +00:00
Tanner 12bb83ade8 Fix lobsters comment parsing 2024-02-27 18:47:00 +00:00
Tanner e85f0d8e19 Disable lobsters 2023-09-13 01:02:15 +00:00
Tanner c228ab0635 Replace "indent_level" with "depth" in lobsters API
See:
https://github.com/lobsters/lobsters/commit/fe09e5aa31993e09ed4ad255bb4a359f1e8a2d62
2023-08-31 07:35:44 +00:00
Tanner f11123b441 Handle Lobsters comment parsing TypeErrors
Too lazy to debug this:

2023-08-29 12:56:35,111 - root - INFO - Updating lobsters story: yktkwr, index: 55
Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run
  File "/home/tanner/qotnews/apiserver/server.py", line 194, in feed_thread
    valid = feed.update_story(story)
  File "/home/tanner/qotnews/apiserver/feed.py", line 74, in update_story
    res = lobsters.story(story['ref'])
  File "/home/tanner/qotnews/apiserver/feeds/lobsters.py", line 103, in story
    s['comments'] = iter_comments(r['comments'])
  File "/home/tanner/qotnews/apiserver/feeds/lobsters.py", line 76, in iter_comments
    parent_stack = parent_stack[:indent-1]
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
2023-08-29T12:56:35Z <Greenlet at 0x7f92ad840ae0: feed_thread> failed with TypeError
2023-08-31 07:30:39 +00:00
Tanner 83fea72578 Add Tildes group whitelist 2023-07-13 22:54:36 +00:00
Tanner 3a0f7e79a2 Increase again 2023-06-13 17:11:50 +00:00
Tanner 0cfbf152eb Increase Tildes story score requirement 2023-06-11 01:01:31 +00:00
Tanner b051794a0c Catch all possible Reddit API exceptions 2023-03-15 21:16:37 +00:00
Tanner e93230d518 Improve logging, sends tweets to nitter.net 2022-03-05 23:48:46 +00:00
Tanner bac043d298 Improve logging 2021-09-06 00:21:05 +00:00
Tanner 214f4c50b8 Remove colons from date string so Python 3.5 can parse 2020-12-15 23:19:50 +00:00
Tanner ce3b986e47 Add Lobsters to feed 2020-12-12 05:26:33 +00:00
Tanner 837bb91bcc Move feed and Praw config to settings.py 2020-11-02 02:26:54 +00:00
Tanner 278fbf9a1c Try Hackernews API twice 2020-11-02 00:17:22 +00:00
Tanner 0ad381bb7e Make qotnews work with WaPo 2020-10-29 04:55:34 +00:00
Tanner 4e1566961a Adjust feeds 2020-10-03 23:41:57 +00:00
Tanner e05aa1c6ee Remove business subreddit from feed 2020-08-14 03:55:28 +00:00
Tanner 38cfc4bda4 Remove extra logging 2020-07-08 02:36:40 +00:00
Tanner 162142083b Fix crash when HN feed fails 2020-07-08 02:36:40 +00:00
Tanner 437b1e313b Add requests timeouts and temporary logging 2020-07-08 02:36:40 +00:00
Tanner d69e054311 Integrate sqlite database with server 2020-07-08 02:36:40 +00:00
Tanner 490bcd5235 Fall back to ref on manual submission title 2020-07-08 02:36:40 +00:00
Tanner c3c5fa0c0a Remove technology subreddit 2020-07-08 02:36:40 +00:00
Tanner 54f30e20f5 Update tildes parser group tag 2020-07-08 02:36:40 +00:00
Tanner de1bcd9abc Fix tildes deleted comment parser error 2020-01-28 04:19:26 +00:00
Tanner 393b676791 Sanitize html 2019-12-01 22:18:41 +00:00
Tanner 6ca4a32030 Allow manual submission of articles 2019-11-08 05:55:30 +00:00
Tanner dc87026f99 Add subreddit 2019-11-07 22:09:45 +00:00
Tanner 9283f8439c Fix Tildes down for maintenance edge case 2019-10-22 05:01:30 +00:00
Tanner 8f8a11954a Archive WSJ articles first, catch KeyboardInterrupt 2019-10-15 21:03:47 +00:00
Tanner 6bd3bf1090 Cache all articles in IndexedDB 2019-10-12 23:41:31 +00:00
Tanner 536214be1f Fix Tildes comments with unknown authors 2019-10-08 08:01:17 +00:00
Tanner 1acdd92cbf Ignore new Tildes posts and handle deleted ones 2019-09-24 08:21:26 +00:00
Tanner 37904a467b Handle Reddit PRAW exceptions 2019-09-24 08:20:46 +00:00
Tanner 1682cb8247 Filter out False comments 2019-08-30 06:23:14 +00:00
Tanner f1c89fcf8b Render reddit markdown, poll tildes better, add utils 2019-08-28 04:13:02 +00:00
Tanner fb49dde034 Fix tildes comments parsing bug 2019-08-25 07:46:22 +00:00
Tanner 5ff27591a7 Add tildes to feeds 2019-08-25 00:36:26 +00:00
Tanner 3842ec24d9 Add reddit to feeds 2019-08-24 21:37:43 +00:00
Tanner 8e73f746c3 Abstract api server feeds 2019-08-24 08:49:11 +00:00
Tanner 351b8a00ee Write news stories to disk 2019-08-24 05:07:16 +00:00
Tanner d039191232 Finish prototype api server 2019-08-23 08:23:48 +00:00