{"id":17872,"date":"2021-01-05T12:17:10","date_gmt":"2021-01-05T12:17:10","guid":{"rendered":"http:\/\/www.wjst.de\/blog\/?p=17872"},"modified":"2021-01-05T12:20:16","modified_gmt":"2021-01-05T12:20:16","slug":"how-to-save-a-twitter-thread","status":"publish","type":"post","link":"https:\/\/www.wjst.de\/blog\/sciencesurf\/2021\/01\/how-to-save-a-twitter-thread\/","title":{"rendered":"How to save a Twitter thread"},"content":{"rendered":"<p>This is not a trivial task as most browser produce garbage when printing to pdf. Also screenshots do not help so much with multipage threads. &#8220;Unroll&#8221; also doesn&#8217;t work reliable.<\/p>\n<p>So I have been using the archive.today plugin before producing the pdf,\u00a0 but this method is time consuming\u00a0 as it needs a captcha.<\/p>\n<p><a href=\"https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2021\/01\/y.jpg\" data-rel=\"key-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-17873\" src=\"https:\/\/www.wjst.de\/blog\/wp-content\/uploads\/2021\/01\/y.jpg\" alt=\"\" width=\"214\" height=\"220\" \/><\/a><\/p>\n<p>Having now Selenium running in a docker container, there is a more convenient solution where\u00a0 just two lines of <a href=\"https:\/\/cran.r-project.org\/web\/packages\/RSelenium\/vignettes\/basics.html#sending-key-presses-to-elements\">R<\/a> are sufficient<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nremDr$navigate(&quot;https:\/\/twitter.com\/SZ_Muenchen\/status\/1346425350394236930&quot;)\r\nremDr$screenshot(file = 'screen.png')\r\n<\/pre>\n<p>Login is also possible as explained at<a href=\"https:\/\/stackoverflow.com\/questions\/43580133\/how-to-use-rselenium-to-login-to-a-website-on-windows-machine\"> github<\/a>&#8230;<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nusername &lt;- remDr$findElement(using = &quot;name&quot;, value = &quot;session&#x5B;username_or_email]&quot;)\r\nusername$sendKeysToElement(list(&quot;XXX&quot;))\r\npasswd &lt;- remDr$findElement(using = &quot;name&quot;, value = &quot;session&#x5B;password]&quot;)\r\npasswd$sendKeysToElement(list(&quot;XXX&quot;, &quot;\\uE007&quot;))\r\n<\/pre>\n\n<p>&nbsp;<\/p>\n<div class=\"bottom-note\">\n  <span class=\"mod1\">CC-BY-NC Science Surf , accessed 03.04.2026<\/span>\n <\/div>","protected":false},"excerpt":{"rendered":"<p>This is not a trivial task as most browser produce garbage when printing to pdf. Also screenshots do not help so much with multipage threads. &#8220;Unroll&#8221; also doesn&#8217;t work reliable. So I have been using the archive.today plugin before producing the pdf,\u00a0 but this method is time consuming\u00a0 as it needs a captcha. Having now &hellip; <a href=\"https:\/\/www.wjst.de\/blog\/sciencesurf\/2021\/01\/how-to-save-a-twitter-thread\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to save a Twitter thread<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[3588,3589,1042],"class_list":["post-17872","post","type-post","status-publish","format-standard","hentry","category-computer-software","tag-save","tag-thread","tag-twitter"],"_links":{"self":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/17872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/comments?post=17872"}],"version-history":[{"count":3,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/17872\/revisions"}],"predecessor-version":[{"id":17877,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/17872\/revisions\/17877"}],"wp:attachment":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/media?parent=17872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/categories?post=17872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/tags?post=17872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}