{"id":453,"date":"2017-12-28T04:47:45","date_gmt":"2017-12-28T04:47:45","guid":{"rendered":"http:\/\/wizardofbots.com\/network\/?p=453"},"modified":"2022-11-03T20:34:57","modified_gmt":"2022-11-03T20:34:57","slug":"extract-all-of-the-users-tweets-into-a-csv-using-python","status":"publish","type":"post","link":"https:\/\/wizardofbots.com\/network\/extract-all-of-the-users-tweets-into-a-csv-using-python\/","title":{"rendered":"Extract all of the users tweets into a csv using Python"},"content":{"rendered":"<p>What&#8217;s up guys, here I present you a way of scraping all of a user&#8217;s tweets into a CSV, you can use it into an AI or whatever you want. It&#8217;s your choice.<\/p>\n<p>First, you will need to install the <a href=\"https:\/\/www.tweepy.org\/\">tweepy<\/a> library of Python3<\/p>\n<p>Then you need to get your API credentials by making an app on Twitter<\/p>\n<pre>#Twitter API credentials \nconsumer_key = \"\" \nconsumer_secret = \"\" \naccess_key = \"\" \naccess_secret = \"\"<\/pre>\n<p>Here is the full source:<\/p>\n\n\t\t<div class=\"subscribeunlock_container\">\n\t\t\t<div name=\"subscribeunlock\" class=\"subscribeunlock_box\" id=\"subscribeunlock_1692\">\n\t\t\t\t<div class=\"subscribeunlock_signup_form\" id=\"subscribeunlock_signup_form_1692\">\n\t\t\t\t\t<div class=\"subscribeunlock_form_row\"><p>Complete your name and email to unlock the code...<\/p><\/div>\n\t\t\t\t\t<div class=\"subscribeunlock_form_row\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"subscribeunlock_form_column subscribeunlock_50\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<input required=\"required\" tabindex=\"101\" class=\"subscribeunlock-input subscribeunlock_fullwidth\" type=\"text\" id=\"name_1692\" placeholder=\"Enter your name...\" value=\"Enter your name...\" onfocus=\"if (this.value == 'Enter your name...') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = 'Enter your name...';}\" title=\"Enter your name...\" \/>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"subscribeunlock_form_column subscribeunlock_50 subscribeunlock_form_right_column\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<input required=\"required\" tabindex=\"102\" class=\"subscribeunlock-input subscribeunlock_fullwidth\" type=\"text\" id=\"email_1692\" placeholder=\"Enter your e-mail...\" value=\"Enter your e-mail...\" onfocus=\"if (this.value == 'Enter your e-mail...') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = 'Enter your e-mail...';}\" title=\"Enter your e-mail...\" \/>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<a href=\"#\" tabindex=\"103\" class=\"subscribeunlock-submit\" id=\"submit_1692\" onclick='subscribeunlock_submit(\"_1692\", \"off\"); return false;'>UNLOCK CONTENT<\/a>\n\t\t\t\t\t\t<img decoding=\"async\" id=\"loading_1692\" class=\"subscribeunlock_loading\" src=\"https:\/\/wizardofbots.com\/network\/wp-content\/plugins\/subscribe-unlock\/images\/loading.gif\" alt=\"\">\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div id=\"message_1692\" class=\"subscribeunlock_message\"><\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"subscribeunlock_confirmation_container\" id=\"subscribeunlock_confirmation_container_1692\"><\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>What&#8217;s up guys, here I present you a way of scraping all of a user&#8217;s tweets into a CSV, you can use it into an AI or whatever you want. It&#8217;s your choice. First, you will need to install the tweepy library of Python3 Then you need to get your API credentials by making an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[150,24,148,149],"class_list":["post-453","post","type-post","status-publish","format-standard","hentry","category-python","tag-extract","tag-python","tag-python-extract","tag-twitter"],"_links":{"self":[{"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts\/453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/comments?post=453"}],"version-history":[{"count":2,"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts\/453\/revisions"}],"predecessor-version":[{"id":675,"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts\/453\/revisions\/675"}],"wp:attachment":[{"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/media?parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/categories?post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/tags?post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}