{"post_stream":{"posts":[{"id":479366,"name":"","username":"mermaldad","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/{size}.png","created_at":"2018-10-02T02:28:47.202Z","cooked":"\u003cp\u003eI am looking to semi-automate the process of turning a nominations thread into a table of nominations.  I am using python (specifically the beautiful soup library) to parse the html.  The nominations thread consists of a bunch of posts by users in which they link to a thread or topic that they like.  I have successfully written the code to scrape the nominations thread to find the username of the nominator, the link, and the picture(s) of the project.  My routine can even handle posts with more than one link.\u003c/p\u003e\n\u003cp\u003eThe roadblock I have reached is that if I follow the links, the resultant page will have a number of posts from before the post being linked.  I assume this is to have enough previous info so that the user can scroll up after following the link.   I can’t figure out how to spot the linked post or alternately modify the link so that it shows only the post that was linked.  Anyone got any suggestions?\u003c/p\u003e\n\u003cp\u003eP.S. it’s a little rough right now, but I’ll be happy to share my code when I get it working.\u003c/p\u003e","post_number":1,"post_type":1,"posts_count":5,"updated_at":"2018-10-02T12:00:38.126Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":3038,"reads":117,"readers_count":116,"score":15245.4,"yours":false,"topic_id":98520,"topic_slug":"scrape-a-discourse-forum-with-python","display_username":"","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":2,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://meta.discourse.org/t/suggested-topics-title-content-based-suggestions/173354/5","internal":true,"reflection":true,"title":"Suggested Topics - Title \u0026 Content based Suggestions","clicks":1}],"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":39889,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/scrape-a-discourse-forum-with-python/98520/1","locale":"en","is_localized":false,"language":"en","customer_flair_customer":null,"event":null,"calendar_details":[],"reactions":[{"id":"heart","type":"emoji","count":1}],"current_user_reaction":null,"reaction_users_count":1,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":true,"can_vote":false},{"id":479561,"name":"Jay Pfaffman","username":"pfaffman","avatar_template":"/user_avatar/meta.discourse.org/pfaffman/{size}/120154_2.png","created_at":"2018-10-02T13:27:00.573Z","cooked":"\u003cp\u003eIf access the raw markdown pages you won’t have to parse html and will have the URLs without accessing the counters. This topic is \u003ca href=\"https://meta.discourse.org/raw/98520\"\u003ehttps://meta.discourse.org/raw/98520\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eEdit: like others say, the API is really what you want. Here’s the scraper I wrote: \u003ca href=\"https://github.com/pfaffman/discourse-downloader\" class=\"inline-onebox\"\u003eGitHub - pfaffman/discourse-downloader: Download a Discourse topic for offline analysis · GitHub\u003c/a\u003e\u003c/p\u003e","post_number":2,"post_type":1,"posts_count":5,"updated_at":"2018-10-02T14:25:25.050Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":135,"reads":102,"readers_count":101,"score":832.4,"yours":false,"topic_id":98520,"topic_slug":"scrape-a-discourse-forum-with-python","display_username":"Jay Pfaffman","primary_group_name":null,"flair_name":"support-experts","flair_url":"https://global.discourse-cdn.com/meta/original/3X/e/2/e250ec403580530d19e6a9ed42d0d525a51a9dbe.svg","flair_bg_color":"FFFFFF","flair_color":"","flair_group_id":142,"badges_granted":[],"version":2,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://github.com/pfaffman/discourse-downloader","internal":false,"reflection":false,"title":"GitHub - pfaffman/discourse-downloader: Download a Discourse topic for offline analysis","clicks":547}],"read":true,"user_title":"Support Expert","title_is_group":false,"bookmarked":false,"actions_summary":[{"id":2,"count":4}],"moderator":false,"admin":false,"staff":false,"user_id":15209,"hidden":false,"trust_level":4,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/scrape-a-discourse-forum-with-python/98520/2","locale":"en","is_localized":false,"language":"en","customer_flair_customer":null,"event":null,"reactions":[{"id":"heart","type":"emoji","count":4}],"current_user_reaction":null,"reaction_users_count":4,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":true},{"id":479565,"name":"Kara L.","username":"rbrlortie","avatar_template":"/user_avatar/meta.discourse.org/rbrlortie/{size}/166740_2.png","created_at":"2018-10-02T13:37:03.188Z","cooked":"\u003cp\u003eYou might want to use the API. Also, remember that almost all URLs will respond to a .json suffix.\u003c/p\u003e\n\u003cp\u003eE.g. this thread \u003ca href=\"https://meta.discourse.org/t/scrape-a-discourse-forum-with-python/98520.json\"\u003ehttps://meta.discourse.org/t/scrape-a-discourse-forum-with-python/98520.json\u003c/a\u003e\u003c/p\u003e","post_number":3,"post_type":1,"posts_count":5,"updated_at":"2018-10-02T13:37:03.188Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":59,"reads":98,"readers_count":97,"score":479.6,"yours":false,"topic_id":98520,"topic_slug":"scrape-a-discourse-forum-with-python","display_username":"Kara L.","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":"Bug Reporter","title_is_group":false,"bookmarked":false,"actions_summary":[{"id":2,"count":7}],"moderator":false,"admin":false,"staff":false,"user_id":35536,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/scrape-a-discourse-forum-with-python/98520/3","locale":"en","is_localized":false,"language":"en","customer_flair_customer":null,"event":null,"reactions":[{"id":"heart","type":"emoji","count":7}],"current_user_reaction":null,"reaction_users_count":7,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":true,"topic_accepted_answer":true},{"id":479571,"name":"Mark McClure","username":"mcmcclur","avatar_template":"/user_avatar/meta.discourse.org/mcmcclur/{size}/115456_2.png","created_at":"2018-10-02T14:08:50.914Z","cooked":"\u003cp\u003eI also recommend that you use the API, rather than the HTML. That’s how I set up the archival tool described in \u003ca href=\"https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614\"\u003ethis topic\u003c/a\u003e.\u003c/p\u003e","post_number":4,"post_type":1,"posts_count":5,"updated_at":"2018-10-02T14:12:57.531Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":34,"reads":86,"readers_count":85,"score":382.2,"yours":false,"topic_id":98520,"topic_slug":"scrape-a-discourse-forum-with-python","display_username":"Mark McClure","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614","internal":true,"reflection":false,"title":"A basic Discourse archival tool","clicks":280}],"read":true,"user_title":"Contributor","title_is_group":false,"bookmarked":false,"actions_summary":[{"id":2,"count":7}],"moderator":false,"admin":false,"staff":false,"user_id":13426,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/scrape-a-discourse-forum-with-python/98520/4","locale":"en","is_localized":false,"language":"en","localized_oneboxes":[{"topic_id":62614,"post_number":1,"title":"Discourse 基本归档工具","excerpt":"归档工具已使用 Codex（2026 年 5 月）更新 \n将完整的 Discourse 站点保存为静态版本似乎相当棘手。根据 Jeff Atwood 的 \u003ca href=\"https://meta.discourse.org/t/archive-an-old-forum-in-place-to-start-a-new-discourse-forum/13433/10\"\u003e这篇帖子\u003c/a\u003e，这「比你想的要难得多」。Discourse 团队似乎也未将此列为优先事项，这一点完全可以理解。 \n不过，就我而言，我发现自己确实需要一种方法来生成 Discourse 站点的基本静态 HTML版本。多年来，我一直将 Discourse 用作大学数学课程的教学讨论板，因此每隔几个月，我就会让一两个站点退役，并新建一两个站点。显然，那些即将退役站点上的讨论具有价值，因此我迫切需要一种方法来保存它们。最终，我决定自己开发一个工具。 \n基本思路很简单：利用 Discourse API 抓取站点内容，获取每篇帖子的渲染后版本，并将其转换为 HTML。该工具主要满足我作为一名大学数学教授的需求，我使用小型 Discourse 论坛来支持数学课程。因此，数学内容（如 $f(x)=e^{-x^2}$）应自动使用 MathJax V4 进行排版，且标记为 sage 的代码块将被转换为可交互的 Sage Cells。 \n如果您感兴趣，可以查看以\u0026hellip;"}],"customer_flair_customer":null,"event":null,"reactions":[{"id":"heart","type":"emoji","count":7}],"current_user_reaction":null,"reaction_users_count":7,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":true},{"id":479769,"name":"","username":"mermaldad","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/{size}.png","created_at":"2018-10-03T01:33:44.760Z","cooked":"\u003cp\u003eThanks, all, your suggestions are very helpful!  I particularly like that examples were offered in two languages.  I’m going to go with the Python, but it’s cool to see the Ruby example as well.\u003c/p\u003e","post_number":5,"post_type":1,"posts_count":5,"updated_at":"2018-10-03T01:33:44.760Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":13,"reads":71,"readers_count":70,"score":109.2,"yours":false,"topic_id":98520,"topic_slug":"scrape-a-discourse-forum-with-python","display_username":"","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":2}],"moderator":false,"admin":false,"staff":false,"user_id":39889,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/scrape-a-discourse-forum-with-python/98520/5","locale":"en","is_localized":false,"language":"en","customer_flair_customer":null,"event":null,"reactions":[{"id":"heart","type":"emoji","count":2}],"current_user_reaction":null,"reaction_users_count":2,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":true},{"id":1341215,"name":"system","username":"system","avatar_template":"/user_avatar/meta.discourse.org/system/{size}/443519_2.png","created_at":"2023-08-09T01:13:32.374Z","cooked":"\u003cp\u003eThis topic was automatically closed 30 days after the last reply. New replies are no longer allowed.\u003c/p\u003e","post_number":7,"post_type":3,"posts_count":5,"updated_at":"2023-08-09T01:13:32.374Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":7,"reads":11,"readers_count":10,"score":37.2,"yours":false,"topic_id":98520,"topic_slug":"scrape-a-discourse-forum-with-python","display_username":"system","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[],"moderator":true,"admin":true,"staff":true,"user_id":-1,"hidden":false,"trust_level":4,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"action_code":"autoclosed.enabled","post_url":"/t/scrape-a-discourse-forum-with-python/98520/7","locale":null,"is_localized":false,"customer_flair_customer":null,"event":null,"reactions":[],"current_user_reaction":null,"reaction_users_count":0,"current_user_used_main_reaction":false,"can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":true}],"stream":[479366,479561,479565,479571,479769,1341215]},"timeline_lookup":[[1,2915],[5,2914],[6,1143]],"suggested_topics":[],"tags":[],"tags_descriptions":{},"fancy_title":"使用 Python 抓取 Discourse 论坛","fancy_title_localized":true,"locale":"en","id":98520,"title":"Scrape a discourse forum with python","posts_count":5,"created_at":"2018-10-02T02:28:47.065Z","views":5221,"reply_count":0,"like_count":21,"last_posted_at":"2018-10-03T01:33:44.760Z","visible":true,"closed":true,"archived":false,"has_summary":false,"archetype":"regular","slug":"scrape-a-discourse-forum-with-python","category_id":7,"word_count":367,"deleted_at":null,"user_id":39889,"featured_link":null,"pinned_globally":false,"pinned_at":null,"pinned_until":null,"image_url":null,"slow_mode_seconds":0,"draft":null,"draft_key":"topic_98520","draft_sequence":null,"unpinned":null,"pinned":false,"current_post_number":1,"highest_post_number":7,"deleted_by":null,"actions_summary":[{"id":4,"count":0,"hidden":false,"can_act":false},{"id":8,"count":0,"hidden":false,"can_act":false},{"id":10,"count":0,"hidden":false,"can_act":false},{"id":7,"count":0,"hidden":false,"can_act":false},{"id":1002,"count":0,"hidden":false,"can_act":false}],"chunk_size":20,"bookmarked":false,"topic_timer":null,"message_bus_last_id":0,"participant_count":4,"show_read_indicator":false,"thumbnails":null,"slow_mode_enabled_until":null,"has_localized_content":true,"board_memberships":[],"related_topics":[{"fancy_title":"通过链接搜索","fancy_title_localized":true,"locale":"en","id":339422,"title":"Search by link","slug":"search-by-link","posts_count":8,"reply_count":4,"highest_post_number":8,"image_url":null,"created_at":"2024-11-30T01:43:27.344Z","last_posted_at":"2024-12-07T20:16:53.358Z","bumped":true,"bumped_at":"2024-12-07T20:16:53.358Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"您好， \n我正在编写一个 Python 脚本，需要搜索我的论坛并在论坛帖子内容中检查是否存在外部链接。 \n问题是：我手动检查过，它找到了一些包含链接的帖子，但也有一些没有找到，尽管链接就在帖子中。 \n这种情况是符合预期的吗？","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[{"id":51,"name":"搜索","slug":"search"}],"tags_descriptions":{"搜索":"涵盖 Discourse 的默认索引搜索功能。"},"like_count":5,"views":199,"category_id":7,"featured_link":null,"op_like_count":0,"has_accepted_answer":false,"posters":[{"extras":"latest","description":"原始發帖人、最新發帖人","user":{"id":144474,"username":"David_Ghost","name":"","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/d/c37758/{size}.png","flair_name":"translators","flair_url":"globe","flair_bg_color":"ddd","flair_color":"111","flair_group_id":50,"trust_level":2}},{"extras":null,"description":"最近發文者","user":{"id":13900,"username":"thoka","name":"Thomas Kalka","avatar_template":"/user_avatar/meta.discourse.org/thoka/{size}/115652_2.png","trust_level":2}},{"extras":null,"description":"最近發文者","user":{"id":3,"username":"supermathie","name":"Michael Brown","avatar_template":"/user_avatar/meta.discourse.org/supermathie/{size}/507518_2.png","flair_name":"team","flair_url":"https://global.discourse-cdn.com/meta/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"primary_group_name":"team","admin":true,"trust_level":3}}]},{"fancy_title":"将Wiki帖子转换为HTML","fancy_title_localized":true,"locale":"en","id":202680,"title":"Converting Wiki Posts to HTML","slug":"converting-wiki-posts-to-html","posts_count":4,"reply_count":1,"highest_post_number":4,"image_url":null,"created_at":"2021-09-05T23:23:20.453Z","last_posted_at":"2022-02-13T12:02:00.794Z","bumped":true,"bumped_at":"2022-02-13T12:02:00.794Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"我们希望利用论坛的某些类别来众包知识，这些知识将通过版主整合到维基帖子中。然后，这些内容将以只读 HTML 的形式发布到另一个网站。\n……","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":12,"views":662,"category_id":6,"featured_link":null,"op_like_count":2,"has_accepted_answer":false,"posters":[{"extras":null,"description":"原始發帖人","user":{"id":64586,"username":"John_Lehmann","name":"John Lehmann","avatar_template":"/user_avatar/meta.discourse.org/john_lehmann/{size}/140084_2.png","trust_level":2}},{"extras":null,"description":"頻繁發帖人","user":{"id":15209,"username":"pfaffman","name":"Jay Pfaffman","avatar_template":"/user_avatar/meta.discourse.org/pfaffman/{size}/120154_2.png","flair_name":"support-experts","flair_url":"https://global.discourse-cdn.com/meta/original/3X/e/2/e250ec403580530d19e6a9ed42d0d525a51a9dbe.svg","flair_bg_color":"FFFFFF","flair_group_id":142,"trust_level":4}},{"extras":null,"description":"最近發文者","user":{"id":32,"username":"codinghorror","name":"Jeff Atwood","avatar_template":"/user_avatar/meta.discourse.org/codinghorror/{size}/110067_2.png","admin":true,"trust_level":2}},{"extras":"latest","description":"最新發帖人","user":{"id":81545,"username":"4ong","name":"Anatol Myshkin","avatar_template":"/user_avatar/meta.discourse.org/4ong/{size}/186618_2.png","trust_level":2}}]},{"fancy_title":"Grabbing Facebook reactions as posts","fancy_title_localized":false,"locale":null,"id":24421,"title":"Grabbing Facebook reactions as posts","slug":"grabbing-facebook-reactions-as-posts","posts_count":8,"reply_count":6,"highest_post_number":8,"image_url":null,"created_at":"2015-01-25T13:55:55.703Z","last_posted_at":"2015-01-26T15:03:56.713Z","bumped":true,"bumped_at":"2015-01-26T15:03:56.713Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"Usually there is an issue when we share a link a topic on social networks: people comment to the topic on the network itself, instead of going to the forum and doing a proper forum-reply. \nTime ago, using a different for\u0026hellip;","visible":true,"closed":false,"archived":true,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":7,"views":1422,"category_id":2,"featured_link":null,"op_like_count":3,"has_accepted_answer":false,"posters":[{"extras":null,"description":"原始發帖人","user":{"id":6947,"username":"rodrigofarcas","name":"Rodrigo Farcas","avatar_template":"/user_avatar/meta.discourse.org/rodrigofarcas/{size}/69085_2.png","trust_level":2}},{"extras":null,"description":"頻繁發帖人","user":{"id":13248,"username":"FezodgeIII","name":"Joseph Pullan","avatar_template":"/user_avatar/meta.discourse.org/fezodgeiii/{size}/37408_2.png","trust_level":0}},{"extras":null,"description":"最近發文者","user":{"id":113000,"username":"chapoi","name":"","avatar_template":"/user_avatar/meta.discourse.org/chapoi/{size}/537252_2.png","flair_name":"team","flair_url":"https://global.discourse-cdn.com/meta/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"admin":true,"trust_level":3}},{"extras":"latest","description":"最新發帖人","user":{"id":12849,"username":"thangngoc89","name":"Khoa Nguyen","avatar_template":"/user_avatar/meta.discourse.org/thangngoc89/{size}/115436_2.png","trust_level":2}}]},{"fancy_title":"将原始 Markdown 链接转换为 HTML","fancy_title_localized":true,"locale":"en","id":102422,"title":"Converting links from raw markdown to HTML","slug":"converting-links-from-raw-markdown-to-html","posts_count":3,"reply_count":1,"highest_post_number":3,"image_url":null,"created_at":"2018-11-20T21:16:49.960Z","last_posted_at":"2018-11-21T14:13:05.460Z","bumped":true,"bumped_at":"2018-11-21T18:01:59.966Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"上下文  \n我试图检索特定帖子，将它们合并为一个语料库（例如一本书），以便在其他地方进行处理（例如使用 Pandoc）。  \n“简单”方法  \nDiscourse 提供了两种易于访问的下载方式 …","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":8,"views":1917,"category_id":7,"featured_link":null,"op_like_count":2,"has_accepted_answer":false,"posters":[{"extras":"latest","description":"原始發帖人、最新發帖人","user":{"id":14460,"username":"hellekin","name":"","avatar_template":"/user_avatar/meta.discourse.org/hellekin/{size}/51636_2.png","trust_level":2}},{"extras":null,"description":"最近發文者","user":{"id":4881,"username":"gerhard","name":"Gerhard Schlager","avatar_template":"/user_avatar/meta.discourse.org/gerhard/{size}/119479_2.png","flair_name":"team","flair_url":"https://global.discourse-cdn.com/meta/original/3X/e/b/ebee30bd98aef20357e4a177a5a1e45b877ce088.svg","flair_color":"111","flair_group_id":47,"primary_group_name":"team","admin":true,"trust_level":2}}]},{"fancy_title":"What method is used by Discourse to identify urls in post body","fancy_title_localized":false,"locale":null,"id":75876,"title":"What method is used by Discourse to identify urls in post body","slug":"what-method-is-used-by-discourse-to-identify-urls-in-post-body","posts_count":7,"reply_count":3,"highest_post_number":7,"image_url":null,"created_at":"2017-12-12T15:16:44.780Z","last_posted_at":"2017-12-12T17:22:27.342Z","bumped":true,"bumped_at":"2017-12-12T17:22:27.342Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"excerpt":"What method is used by Discourse to identify urls in post body and make it clickable?. I tried going through the codebase. But still no luck.","visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"thumbnails":null,"tags":[],"tags_descriptions":{},"like_count":14,"views":1207,"category_id":7,"featured_link":null,"op_like_count":0,"has_accepted_answer":false,"posters":[{"extras":"latest","description":"原始發帖人、最新發帖人","user":{"id":25857,"username":"Sudaraka","name":"Sudaraka Jayathilaka","avatar_template":"/user_avatar/meta.discourse.org/sudaraka/{size}/68401_2.png","flair_name":"plugin_authors","flair_url":"plug","flair_bg_color":"dddddd","flair_color":"111111","flair_group_id":48,"primary_group_name":"plugin_authors","trust_level":2}},{"extras":null,"description":"頻繁發帖人","user":{"id":31686,"username":"notriddle","name":"Michael Howell","avatar_template":"/user_avatar/meta.discourse.org/notriddle/{size}/133055_2.png","trust_level":2}},{"extras":null,"description":"最近發文者","user":{"id":21544,"username":"vinothkannans","name":"Vinoth Kannan","avatar_template":"/user_avatar/meta.discourse.org/vinothkannans/{size}/86465_2.png","flair_name":"plugin_authors","flair_url":"plug","flair_bg_color":"dddddd","flair_color":"111111","flair_group_id":48,"trust_level":2}},{"extras":null,"description":"最近發文者","user":{"id":31865,"username":"xrav3nz","name":"","avatar_template":"/user_avatar/meta.discourse.org/xrav3nz/{size}/76894_2.png","trust_level":2}}]}],"summarizable":false,"has_cached_summary":false,"has_livestream":null,"valid_reactions":["heart","laughing","cry","exploding_head","clap","confetti_ball","hugs","chefs_kiss","100","+1","rocket","star_struck","discourse","eyes"],"accepted_answers":[{"id":479565,"name":"Kara L.","username":"rbrlortie","avatar_template":"/user_avatar/meta.discourse.org/rbrlortie/{size}/166740_2.png","created_at":"2018-10-02T13:37:03.188Z","cooked":"\u003cp\u003eYou might want to use the API. Also, remember that almost all URLs will respond to a .json suffix.\u003c/p\u003e\n\u003cp\u003eE.g. this thread \u003ca href=\"https://meta.discourse.org/t/scrape-a-discourse-forum-with-python/98520.json\"\u003ehttps://meta.discourse.org/t/scrape-a-discourse-forum-with-python/98520.json\u003c/a\u003e\u003c/p\u003e","post_number":3,"topic_id":98520,"url":"/t/scrape-a-discourse-forum-with-python/98520/3"}],"has_accepted_answer":true,"can_create_shared_issue":false,"shared_issue_visible":false,"can_vote":false,"vote_count":0,"user_voted":false,"discourse_zendesk_plugin_zendesk_id":null,"discourse_zendesk_plugin_zendesk_url":"https://your-url.zendesk.com/agent/tickets/","details":{"can_edit":false,"notification_level":1,"participants":[{"id":39889,"username":"mermaldad","name":"","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/{size}.png","post_count":2,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":1},{"id":13426,"username":"mcmcclur","name":"Mark McClure","avatar_template":"/user_avatar/meta.discourse.org/mcmcclur/{size}/115456_2.png","post_count":1,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":2},{"id":15209,"username":"pfaffman","name":"Jay Pfaffman","avatar_template":"/user_avatar/meta.discourse.org/pfaffman/{size}/120154_2.png","post_count":1,"primary_group_name":null,"flair_name":"support-experts","flair_url":"https://global.discourse-cdn.com/meta/original/3X/e/2/e250ec403580530d19e6a9ed42d0d525a51a9dbe.svg","flair_color":"","flair_bg_color":"FFFFFF","flair_group_id":142,"trust_level":4},{"id":35536,"username":"rbrlortie","name":"Kara L.","avatar_template":"/user_avatar/meta.discourse.org/rbrlortie/{size}/166740_2.png","post_count":1,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":2}],"created_by":{"id":39889,"username":"mermaldad","name":"","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/{size}.png"},"last_poster":{"id":39889,"username":"mermaldad","name":"","avatar_template":"https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/{size}.png"},"links":[{"url":"https://github.com/pfaffman/discourse-downloader","title":"GitHub - pfaffman/discourse-downloader: Download a Discourse topic for offline analysis","internal":false,"attachment":false,"reflection":false,"clicks":547,"user_id":15209,"domain":"github.com","root_domain":"github.com"},{"url":"https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614","title":"A basic Discourse archival tool","internal":true,"attachment":false,"reflection":false,"clicks":280,"user_id":13426,"domain":"meta.discourse.org","root_domain":"discourse.org"},{"url":"https://meta.discourse.org/t/suggested-topics-title-content-based-suggestions/173354/5","title":"Suggested Topics - Title \u0026 Content based Suggestions","internal":true,"attachment":false,"reflection":true,"clicks":1,"user_id":96028,"domain":"meta.discourse.org","root_domain":"discourse.org"}]},"bookmarks":[]}