Article URL: https://news.ycombinator.com/item?id=15889939
Comments URL: https://news.ycombinator.com/item?id=15889939
Points: 54
# Comments: 29
" 40 | }, 41 | { 42 | "friend_shares": [], 43 | "story_authors": "Andrew Liptak", 44 | "intelligence": { 45 | "feed": 0, 46 | "tags": 0, 47 | "author": 0, 48 | "title": 0 49 | }, 50 | "story_permalink": "https://www.theverge.com/2017/12/9/16756896/jessica-jones-season-2-teaser-trailer-watch", 51 | "reply_count": 0, 52 | "comment_user_ids": [], 53 | "story_timestamp": "1512858665", 54 | "share_user_ids": [], 55 | "story_hash": "576138:52eed5", 56 | "id": "https://www.theverge.com/2017/12/9/16756896/jessica-jones-season-2-teaser-trailer-watch", 57 | "comment_count": null, 58 | "score": 0, 59 | "story_tags": [ 60 | "fundings & exits", 61 | "hyperloop" 62 | ], 63 | "share_count": null, 64 | "friend_comments": [], 65 | "story_date": "2017-12-09 22:31:05", 66 | "short_parsed_date": "Yesterday, 5:31pm", 67 | "guid_hash": "52eed5", 68 | "image_urls": [ 69 | "https://cdn.vox-cdn.com/thumbor/KReBajkoWVvP5vYpwxqXWi8cD0w=/270x0:1920x864/fit-in/1200x630/cdn.vox-cdn.com/uploads/chorus_asset/file/9841323/Screen_Shot_2017_12_09_at_5.18.58_PM.png" 70 | ], 71 | "story_feed_id": 1186180, 72 | "long_parsed_date": "Yesterday, December 9th 5:31pm", 73 | "public_comments": [], 74 | "read_status": 0, 75 | "has_modifications": false, 76 | "story_title": "Jessica Jones’ second season gets its first teaser", 77 | "story_content": "When we last saw Jessica Jones in Netflix’s The Defenders, she escaped from the destruction of Midland Circle along with Luke Cage and Danny Rand, who all look to move on with their lives after stopping The Hand. Netflix debuted the first trailer for the next season of Marvel’s Jessica Jones, showing that while Jones is trying to move on, her past is catching up to her.
\\nIn the teaser, we see that Jones is back to working as a private investigator, musing that people have their secrets, or at least someone else’s. It seems that there’s still some surprises in her past: her friend Trish telling her that knowing what was done to her might be helpful. Jones isn’t sold on the idea, asking “what if facing it makes me worse?” Along the way,...
\\n\\n Continue reading…\\n
", 78 | "starred": true 79 | } 80 | ], 81 | "result": "ok", 82 | "message": null, 83 | "classifiers": { 84 | "576138": { 85 | "authors": {}, 86 | "feeds": {}, 87 | "titles": { 88 | "iPhone": 1 89 | }, 90 | "tags": {} 91 | }, 92 | "6188470": { 93 | "authors": {}, 94 | "feeds": {}, 95 | "titles": { 96 | "NYTimes": 1, 97 | "Python": 1, 98 | "Deep Learning": 1, 99 | "JavaScript": 1, 100 | "Facebook": -1, 101 | "Ask HN": 1 102 | }, 103 | "tags": {} 104 | } 105 | }, 106 | "user_profiles": [] 107 | } 108 | -------------------------------------------------------------------------------- /test/fixtures/newsblur/feeds.json: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "Writers": [ 5 | 76, 6 | 38, 7 | 569, 8 | 183139, 9 | 5708255, 10 | 21309 11 | ] 12 | }, 13 | { 14 | "Blogs": [ 15 | 6227976, 16 | 6227690, 17 | 3581, 18 | 5994357, 19 | 1186180, 20 | 5636682, 21 | 526, 22 | 5261603, 23 | { 24 | "Photoblogs": [ 25 | 50, 26 | 551953, 27 | 34, 28 | 776101, 29 | 3556, 30 | 1480028, 31 | 1095, 32 | 588075, 33 | 5984253, 34 | 5752038, 35 | 1627 36 | ] 37 | }, 38 | 6605581 39 | ] 40 | }, 41 | 8032018 42 | ], 43 | "saved_searches": [], 44 | "user_id": 39040, 45 | "social_profile": { 46 | "website": "", 47 | "following_user_ids": [ 48 | 32048, 49 | 13, 50 | 33405, 51 | 26578, 52 | 219352 53 | ], 54 | "following_count": 5, 55 | "shared_stories_count": 0, 56 | "private": true, 57 | "large_photo_url": "https://www.gravatar.com/avatar/e3c7a29b7538122f0ee20f8e9cf05f42", 58 | "id": "social:39040", 59 | "feed_address": "http://www.newsblur.com/social/rss/39040/homepage", 60 | "user_id": 39040, 61 | "feed_link": "http://homepage.newsblur.com/", 62 | "follower_user_ids": [ 63 | 33143, 64 | 33727, 65 | 39285, 66 | 35059 67 | ], 68 | "location": "", 69 | "popular_publishers": [], 70 | "follower_count": 4, 71 | "username": "homepage", 72 | "bio": "", 73 | "average_stories_per_month": 0, 74 | "feed_title": "homepage's blurblog", 75 | "photo_service": "gravatar", 76 | "stories_last_month": 0, 77 | "photo_url": "https://www.gravatar.com/avatar/e3c7a29b7538122f0ee20f8e9cf05f42", 78 | "num_subscribers": 4, 79 | "protected": true 80 | }, 81 | "starred_counts": [ 82 | { 83 | "count": 0, 84 | "feed_address": "http://www.newsblur.com/reader/starred_rss/39040/75ddb05c6a00/", 85 | "tag": "", 86 | "feed_id": null 87 | } 88 | ], 89 | "starred_count": 0, 90 | "is_staff": false, 91 | "result": "ok", 92 | "authenticated": true, 93 | "feeds": { 94 | "1186180": { 95 | "subs": 14627, 96 | "favicon_url": "https://s3.amazonaws.com/icons.newsblur.com/1186180.png", 97 | "is_push": false, 98 | "feed_opens": 183034, 99 | "id": 1186180, 100 | "s3_icon": true, 101 | "feed_link": "http://bestof.metafilter.com/", 102 | "updated_seconds_ago": 1055, 103 | "favicon_fetching": false, 104 | "ng": 0, 105 | "favicon_border": "004c72", 106 | "last_story_date": "2017-12-09 17:01:18", 107 | "nt": 1, 108 | "not_yet_fetched": false, 109 | "updated": "17 minutes", 110 | "average_stories_per_month": 10, 111 | "ps": 0, 112 | "feed_address": "http://feeds.feedburner.com/BestOfMetafilter", 113 | "feed_title": "Best of MetaFilter", 114 | "favicon_fade": "2489bb", 115 | "is_newsletter": false, 116 | "last_story_seconds_ago": 51343, 117 | "favicon_color": "016698", 118 | "stories_last_month": 19, 119 | "active": true, 120 | "fetched_once": true, 121 | "favicon_text_color": "white", 122 | "subscribed": true, 123 | "num_subscribers": 14627, 124 | "s3_page": false, 125 | "min_to_decay": 22, 126 | "search_indexed": true 127 | }, 128 | "569": { 129 | "subs": 16058, 130 | "favicon_url": "https://s3.amazonaws.com/icons.newsblur.com/569.png", 131 | "is_push": false, 132 | "feed_opens": 40418, 133 | "id": 569, 134 | "s3_icon": true, 135 | "feed_link": "http://anildash.com/", 136 | "updated_seconds_ago": 965, 137 | "favicon_fetching": false, 138 | "ng": 0, 139 | "favicon_border": "818180", 140 | "last_story_date": "2017-09-11 13:07:05", 141 | "nt": 0, 142 | "not_yet_fetched": false, 143 | "updated": "16 minutes", 144 | "average_stories_per_month": 3, 145 | "ps": 0, 146 | "feed_address": "http://feeds.dashes.com/AnilDash", 147 | "feed_title": "Anil\nDash", 148 | "favicon_fade": "cfcfce", 149 | "is_newsletter": false, 150 | "last_story_seconds_ago": 7754996, 151 | "favicon_color": "acacab", 152 | "stories_last_month": 0, 153 | "active": true, 154 | "fetched_once": true, 155 | "favicon_text_color": "white", 156 | "subscribed": true, 157 | "num_subscribers": 16058, 158 | "s3_page": false, 159 | "min_to_decay": 720, 160 | "search_indexed": true 161 | } 162 | }, 163 | "social_services": { 164 | "facebook": { 165 | "syncing": false, 166 | "facebook_picture_url": null, 167 | "facebook_uid": null 168 | }, 169 | "twitter": { 170 | "twitter_username": null, 171 | "syncing": false, 172 | "twitter_picture_url": null, 173 | "twitter_uid": null 174 | }, 175 | "gravatar": { 176 | "gravatar_picture_url": "https://www.gravatar.com/avatar/e3c7a29b7538122f0ee20f8e9cf05f42" 177 | }, 178 | "appdotnet": { 179 | "syncing": false, 180 | "appdotnet_uid": null, 181 | "appdotnet_picture_url": null 182 | }, 183 | "upload": { 184 | "upload_picture_url": null 185 | } 186 | }, 187 | "categories": null, 188 | "social_feeds": [ 189 | { 190 | "username": "popular", 191 | "ps": 0, 192 | "user_id": 32048, 193 | "subscription_user_id": 32048, 194 | "feed_link": "http://popular.newsblur.com/", 195 | "feed_address": "http://www.newsblur.com/social/rss/32048/popular", 196 | "feed_opens": 59743, 197 | "num_subscribers": 42590, 198 | "shared_stories_count": 2163, 199 | "private": false, 200 | "feed_title": "The People Have Spoken", 201 | "protected": false, 202 | "location": "", 203 | "photo_url": "https://s3.amazonaws.com/avatars.newsblur.com/avatars/32048/thumbnail_profile_1358188630.jpg", 204 | "large_photo_url": "https://s3.amazonaws.com/avatars.newsblur.com/avatars/32048/large_profile_1358188630.jpg", 205 | "is_trained": false, 206 | "ng": 0, 207 | "nt": 0, 208 | "id": "social:32048", 209 | "page_url": "/social/page/32048/popular" 210 | } 211 | ] 212 | } 213 | -------------------------------------------------------------------------------- /test/fixtures/owncloud/categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "id": 1, 5 | "name": "Category 1" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/owncloud/entries.json: -------------------------------------------------------------------------------- 1 | { 2 | "items": [ 3 | { 4 | "id": 1, 5 | "guid": "646062e8942103b24ae2470b552577dd", 6 | "guidHash": "646062e8942103b24ae2470b552577dd", 7 | "url": "http://www.example.com/test.html?from=rss", 8 | "title": "Entry 1", 9 | "author": "author1body 1...
", 12 | "enclosureMime": null, 13 | "enclosureLink": null, 14 | "feedId": 1, 15 | "unread": false, 16 | "starred": false, 17 | "lastModified": 1493260874, 18 | "rtl": false, 19 | "fingerprint": "d20ec9d7c728c6486f418e3d725b03ad", 20 | "contentHash": "3e0d73ae064930f5f0c0eebb3258c100" 21 | }, 22 | { 23 | "id": 2, 24 | "guid": "06b3c14d9433ea9bbdea131bd37168d8", 25 | "guidHash": "06b3c14d9433ea9bbdea131bd37168d8", 26 | "url": "http://www.example.com/test2.html?from=rss", 27 | "title": "Entry 2", 28 | "author": "author2body 2...
", 31 | "enclosureMime": "video/webm", 32 | "enclosureLink": "http://www.example/test.webm", 33 | "feedId": 2, 34 | "unread": true, 35 | "starred": true, 36 | "lastModified": 1493260874, 37 | "rtl": false, 38 | "fingerprint": "6fb19b56a1c30f8e952af57b809d3dec", 39 | "contentHash": "61206dd01bba2282c261215bfc24c6e5" 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /test/fixtures/owncloud/feeds.json: -------------------------------------------------------------------------------- 1 | { 2 | "starredCount": 1, 3 | "feeds": [ 4 | { 5 | "id": 1, 6 | "url": "http://www.example.com/feed/", 7 | "title": "Feed 1", 8 | "faviconLink": "http://www.example.com/favicon.ico", 9 | "added": 1492783825, 10 | "folderId": 1, 11 | "unreadCount": 2, 12 | "ordering": 0, 13 | "link": "http://www.example.com/", 14 | "pinned": false, 15 | "updateErrorCount": 0, 16 | "lastUpdateError": null 17 | }, 18 | { 19 | "id": 2, 20 | "url": "http://www.example2.com/rss.jsp", 21 | "title": "Feed\n2", 22 | "faviconLink": "", 23 | "added": 1492784045, 24 | "folderId": 12, 25 | "unreadCount": 0, 26 | "ordering": 0, 27 | "link": "http://www.example2.com/", 28 | "pinned": false, 29 | "updateErrorCount": 0, 30 | "lastUpdateError": "" 31 | } 32 | ], 33 | "newestItemId": 2 34 | } 35 | -------------------------------------------------------------------------------- /test/fixtures/ttrss/categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "seq": 0, 3 | "status": 0, 4 | "content": [ 5 | { 6 | "id": 1, 7 | "title": "News", 8 | "unread": 0, 9 | "order_id": 0 10 | }, 11 | { 12 | "id": 2, 13 | "title": "Emacs", 14 | "unread": 0, 15 | "order_id": 0 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /test/fixtures/ttrss/entries-no-feed-id.json: -------------------------------------------------------------------------------- 1 | { 2 | "seq": 0, 3 | "status": 0, 4 | "content": [ 5 | { 6 | "id": 1, 7 | "unread": true, 8 | "marked": true, 9 | "published": false, 10 | "updated": 1494158580, 11 | "is_updated": false, 12 | "title": "Pictures not shown in some feeds with figure block", 13 | "link": "http://discourse.tt-rss.org/t/pictures-not-shown-in-some-feeds-with-figure-block/79/14", 14 | "feed_id": null, 15 | "tags": [ 16 | "" 17 | ], 18 | "attachments": [], 19 | "content": "content1", 20 | "labels": [], 21 | "feed_title": "Tiny Tiny RSS:\nForum", 22 | "comments_count": 0, 23 | "comments_link": "", 24 | "always_display_attachments": false, 25 | "author": "@fox", 26 | "score": 0, 27 | "note": null, 28 | "lang": "" 29 | }, 30 | { 31 | "id": 2, 32 | "unread": true, 33 | "marked": true, 34 | "published": true, 35 | "updated": 1512246430, 36 | "is_updated": false, 37 | "title": "PDO is coming, here's what you need to know", 38 | "link": "http://discourse.tt-rss.org/t/pdo-is-coming-heres-what-you-need-to-know/689/6", 39 | "feed_id": null, 40 | "tags": [ 41 | "ttrss_tag1", 42 | "ttrss_tag2" 43 | ], 44 | "content": "content2", 45 | "labels": [], 46 | "feed\_title": "invalid feed title", 47 | "comments\_count": 0, 48 | "comments\_link": "", 49 | "always\_display_attachments": false, 50 | "author": "@fox", 51 | "score": 0, 52 | "note": null, 53 | "lang": "" 54 | } 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /test/fixtures/ttrss/entries.json: -------------------------------------------------------------------------------- 1 | { 2 | "seq": 0, 3 | "status": 0, 4 | "content": [ 5 | { 6 | "id": 1, 7 | "guid": "SHA1:aeb92f1daca1aadd1e58ca9b8c820fab48703ef2", 8 | "unread": false, 9 | "marked": false, 10 | "published": false, 11 | "updated": 1494158580, 12 | "is_updated": false, 13 | "title": "Pictures not shown in some feeds with figure block", 14 | "link": "http://discourse.tt-rss.org/t/pictures-not-shown-in-some-feeds-with-figure-block/79/14", 15 | "feed_id": "1", 16 | "tags": [ 17 | "" 18 | ], 19 | "attachments": [], 20 | "content": "content1", 21 | "labels": [], 22 | "feed_title": "Tiny Tiny RSS: Forum", 23 | "comments_count": 0, 24 | "comments_link": "", 25 | "always_display_attachments": false, 26 | "author": "@author1", 27 | "score": 0, 28 | "note": null, 29 | "lang": "" 30 | }, 31 | { 32 | "id": 2, 33 | "unread": true, 34 | "marked": true, 35 | "published": true, 36 | "updated": 1512246430, 37 | "is_updated": false, 38 | "title": "PDO is coming, here's what you need to know", 39 | "link": "http://discourse.tt-rss.org/t/pdo-is-coming-heres-what-you-need-to-know/689/6", 40 | "feed_id": 1, 41 | "tags": [ 42 | "ttrss_tag1", 43 | "ttrss_tag2" 44 | ], 45 | "content": "content2", 46 | "labels": [], 47 | "feed\_title": "Tiny Tiny RSS: Forum", 48 | "comments\_count": 0, 49 | "comments\_link": "", 50 | "always\_display_attachments": false, 51 | "author": "@author2", 52 | "score": 0, 53 | "note": null, 54 | "lang": "" 55 | } 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /test/fixtures/ttrss/feeds.json: -------------------------------------------------------------------------------- 1 | { 2 | "seq":0, 3 | "status":0, 4 | "content":[ 5 | { 6 | "feed_url":"http://tt-rss.org/forum/rss.php", 7 | "title":"Tiny Tiny RSS:\nForum", 8 | "id":1, 9 | "unread":46, 10 | "has_icon":true, 11 | "cat_id":2, 12 | "last_updated":1494163883, 13 | "order_id":0 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /test/test-checkdoc.el: -------------------------------------------------------------------------------- 1 | (add-to-list 'load-path default-directory) 2 | 3 | (defvar elfeed-protocol-sources (file-expand-wildcards "*.el")) 4 | 5 | ;; test byte-comple 6 | ;; (mapc #'byte-compile-file `(,cdnjs-el)) 7 | 8 | ;; test checkdoc 9 | (dolist (source elfeed-protocol-sources) 10 | (with-current-buffer (find-file-noselect source) 11 | (let ((checkdoc-diagnostic-buffer "*warn*")) 12 | (checkdoc-current-buffer t)))) 13 | -------------------------------------------------------------------------------- /test/test-helper.el: -------------------------------------------------------------------------------- 1 | (load-file "elfeed-protocol-common.el") 2 | (load-file "elfeed-protocol-fever.el") 3 | (load-file "elfeed-protocol-newsblur.el") 4 | (load-file "elfeed-protocol-owncloud.el") 5 | (load-file "elfeed-protocol-ttrss.el") 6 | (load-file "elfeed-protocol.el") 7 | 8 | (elfeed-protocol-enable) 9 | 10 | ;;; copy from elfeed/tests/elfeed-db-tests.el 11 | (defmacro with-elfeed-test (&rest body) 12 | "Run BODY with a fresh, empty database that will be destroyed on exit." 13 | (declare (indent defun)) 14 | `(let* ((elfeed-db nil) 15 | (elfeed-db-feeds nil) 16 | (elfeed-db-entries nil) 17 | (elfeed-db-index nil) 18 | (elfeed-feeds nil) 19 | (elfeed-protocol-feeds nil) 20 | (temp-dir (make-temp-file "elfeed-test-" t)) 21 | (elfeed-db-directory temp-dir) 22 | (elfeed-new-entry-hook nil) 23 | (elfeed-db-update-hook nil) 24 | (elfeed-log-level 'debug) 25 | (elfeed-initial-tags '(unread)) 26 | (elfeed-protocol-fever-categories (make-hash-table :test 'equal)) 27 | (elfeed-protocol-fever-feeds (make-hash-table :test 'equal)) 28 | (elfeed-protocol-newsblur-categories (make-hash-table :test 'equal)) 29 | (elfeed-protocol-newsblur-feeds (make-hash-table :test 'equal)) 30 | (elfeed-protocol-owncloud-categories (make-hash-table :test 'equal)) 31 | (elfeed-protocol-owncloud-feeds (make-hash-table :test 'equal)) 32 | (elfeed-protocol-ttrss-categories (make-hash-table :test 'equal)) 33 | (elfeed-protocol-ttrss-feeds (make-hash-table :test 'equal))) 34 | (when (get-buffer elfeed-log-buffer-name) 35 | (kill-buffer elfeed-log-buffer-name)) 36 | (unwind-protect 37 | (progn ,@body) 38 | (delete-directory temp-dir :recursive)))) 39 | 40 | (defmacro with-fixture (fixture-path &rest body) 41 | "Run BODY with the contents of the file specified by 42 | FIXTURE-PATH inserted into a temporary buffer." 43 | (declare (indent defun)) 44 | `(with-temp-buffer 45 | (insert-file-contents ,fixture-path) 46 | (goto-char (point-min)) 47 | ,@body)) 48 | 49 | (defun dump-elfeed-log () 50 | "Print *elfeed-log* buffer content." 51 | (with-current-buffer elfeed-log-buffer-name (message "%s" (buffer-string)))) 52 | --------------------------------------------------------------------------------