{"id":1064,"date":"2014-06-27T13:37:52","date_gmt":"2014-06-27T13:37:52","guid":{"rendered":"http:\/\/www.silkstream.net\/blog\/?p=1064"},"modified":"2014-09-05T14:55:46","modified_gmt":"2014-09-05T14:55:46","slug":"playing-with-followers-with-twython-csv","status":"publish","type":"post","link":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html","title":{"rendered":"Noob&#8217;s Guide #4: Playing with Followers with Twython"},"content":{"rendered":"<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1132\" alt=\"Noob's Guide to Twython\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/noob-guide-twython-4.jpg\" width=\"556\" height=\"300\" \/><\/p>\n<p style=\"text-align: justify;\">Welcome to the fourth installment of The Noob&#8217;s Guide to Twython, where we&#8217;re playing around with the Twitter API with Python, using the Twython module. These tutorials are aimed at those who are perhaps learning to code for the first time, or have only a beginner&#8217;s knowledge of Python. If you&#8217;re looking for some advanced stuff, you&#8217;ve come to the wrong place!<\/p>\n<p style=\"text-align: justify;\">This tutorial assumes that you already know <a title=\"How To Get Going with Twython\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/06\/how-to-get-going-with-twython.html\" target=\"_blank\">how to set up your Twython<\/a> for the first time!<\/p>\n<hr \/>\n<p style=\"text-align: justify;\">It doesn&#8217;t need to be said that Followers are, and should be, the driving force behind your social success on Twitter. You need to make your Followers feel special for Following you. And you need to get as much information about them as possible, so you can analyse your follower demographics for further analysis and targeting. So you can find out exactly how you can make them feel even more special! And feel that following you is worthwhile&#8230;.<\/p>\n<p style=\"text-align: justify;\">But before you can do any of that, you first need to get some idea of who your followers are. So let&#8217;s start on the basics!<\/p>\n<h2 style=\"text-align: justify;\">Getting a list of a user&#8217;s Twitter Followers:<\/h2>\n<p style=\"text-align: justify;\">Sometimes it&#8217;s handy to quickly get a list of all your Twitter Followers, or all the Followers of a Twitter account, all in one simple list. With Twython, it&#8217;s super easy to do that. So let&#8217;s quickly check out our first step toward our Follower Analysis program!<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span style=\"color: #000000;\"><code>from twython import Twython, TwythonError\r\n<span style=\"color: #ff6600;\"># Let's import the datetime module!<\/span>\r\nimport datetime\r\n\r\napp_key = \"YOUR_APP_KEY\"\r\napp_secret = \"YOUR_APP_SECRET\"\r\noauth_token = \"YOUR_OAUTH_TOKEN\"\r\noauth_token_secret = \"YOUR_OAUTH_TOKEN_SECRET\"\r\n\r\n<span style=\"color: #ff6600;\"># This should be all on one line:<\/span>\r\ntwitter = Twython(app_key,app_secret,oauth_token,oauth_token_secret)\r\n\r\n<span style=\"color: #ff6600;\"># Creating an empty list, ready for our followers<\/span>\r\nfollowers = []\r\n\r\n<span style=\"color: #ff6600;\"># Getting today's date<\/span>\r\ndatestamp = datetime.datetime.now().strftime(\"%Y-%m-%d\")\r\n\r\n<span style=\"color: #ff6600;\"># Asking for the username to get their followers<\/span>\r\nusername = raw_input(\"Retrieve Follower list of: \")\r\n\r\n<span style=\"color: #ff6600;\"># This is to go through paginated results<\/span>\r\nnext_cursor = -1\r\n\r\nwhile(next_cursor):\r\n<span style=\"color: #ff6600;\"># Getting the user's followers (should all be 1 line)<\/span>\r\n    get_followers = twitter.get_followers_list(screen_name=username,count=200,cursor=next_cursor)\r\n<span style=\"color: #ff6600;\"># For each user returned from our get_followers<\/span>\r\n    for follower in get_followers[\"users\"]:\r\n<span style=\"color: #ff6600;\"># Add their screen name to our followers list<\/span>\r\n        followers.append(follower[\"screen_name\"].encode(\"utf-8\"))\r\n        next_cursor = get_followers[\"next_cursor\"]\r\n\r\n<span style=\"color: #ff6600;\"># Create or open a new .txt file<\/span>\r\nfollowers_text = open(username+\"-\"+datestamp+\".txt\",\"a\")\r\n\r\n<span style=\"color: #ff6600;\"># Write the first \"title\" line and followers list to the .txt\r\n<\/span><span style=\"color: #ff6600;\"># Should all be one (very long) line:<\/span>\r\nfollowers_text.write(\"%s has %s followers (%s):\n\n\" % (str(username),str(len(followers)),str(datestamp))+\"\n\".join(followers))\r\n\r\n<span style=\"color: #ff6600;\"># Close the .txt file<\/span>\r\nfollowers_text.close()\r\n<\/code><\/span><\/pre>\n<\/div>\n<h2><\/h2>\n<h2>Creating a Follower List:<\/h2>\n<p>So. Before you hurt yourself&#8230; let&#8217;s break it down:<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span style=\"color: #000000;\"><code>followers = []\r\ndatestamp = datetime.datetime.now().strftime(\"%Y-%m-%d\")\r\nusername = raw_input(\"Retrieve Follower list of: \")\r\nnext_cursor = -1\r\n<\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Setting our initial variables. Line by line:<\/p>\n<ul>\n<li style=\"text-align: justify;\">We&#8217;re going to need to create an empty list to store our followers, once we&#8217;ve gotten them.<\/li>\n<li style=\"text-align: justify;\">We&#8217;re pulling in the <span style=\"color: #ff6600;\"><strong>datetime<\/strong><\/span> module for this, because we&#8217;re going to want to get today&#8217;s date so that we can label our files correctly, and know when the list was taken. So we&#8217;re getting the <strong><span style=\"color: #ff6600;\">.now()<\/span><\/strong> which is the current date\/time. But we need to format how our datestamp is printed using <strong><span style=\"color: #ff6600;\">strftime()<\/span><\/strong> so we only display the year (%Y), the month (%m) and the date (%d). And separate these numbers with a hyphen so it&#8217;s easier to read. So today&#8217;s date should say if you were to try to <strong><span style=\"color: #ff6600;\">print<\/span><\/strong> the datestamp: <span style=\"color: #ff6600;\"><strong>2014-6-27<\/strong><\/span>.<\/li>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #ff6600;\">raw_input()<\/span><\/strong> prompts the user for a string, then stores that string as the variable. So whatever username we type when the program puts &#8220;Retrieve Follower list of: &#8221; will from now be known as <strong><span style=\"color: #ff6600;\">username<\/span><\/strong>.<\/li>\n<li style=\"text-align: justify;\">The results will be returned paginated. -1 is the default first page.<\/li>\n<\/ul>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span style=\"color: #000000;\"><code>while(next_cursor):\r\n<span style=\"color: #ff6600;\"># Should all be one (very long) line:<\/span>\r\n    get_followers = twitter.get_followers_list(screen_name=username,count=200,cursor=next_cursor)\r\n    for follower in get_followers[\"users\"]:\r\n        followers.append(follower[\"screen_name\"].encode(\"utf-8\"))\r\n        next_cursor = get_followers[\"next_cursor\"]\r\n<\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">So what are we doing here? We are telling Twitter to return us a count of 200 followers per &#8220;page&#8221; that belong to the username (that we will enter when the program asks us. This way the username isn&#8217;t hard-coded in. We can change the username every time we run the program).<\/p>\n<p style=\"text-align: justify;\">For every follower that gets returned from <span style=\"color: #ff6600;\"><strong>get_followers<\/strong><\/span>&#8216; users, we want the program to add that follower&#8217;s screen name (i.e. @username, not their Display Name) to our list of <span style=\"color: #ff6600;\"><strong>followers<\/strong><\/span> and encode it in UTF-8, so it can display every character as it should be displayed. Then we move onto the &#8220;next page&#8221; until there&#8217;s no more followers to add to the list!<\/p>\n<h2 style=\"text-align: justify;\">Spitting it out into a handy text file!<\/h2>\n<p>This is the easy part! We just want to shove our followers list into a .txt file, for easy reference later maybe.<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span style=\"color: #000000;\"><code>followers_text = open(username+\"-\"+datestamp+\".txt\",\"a\")\r\n\r\n<span style=\"color: #ff6600;\"># This should all be on one (super-duper long) line:<\/span>\r\nfollowers_text.write(%s has %s followers (%s):\n\n\" % (str(username),str(len(followers)),str(datestamp))+\"\n\".join(followers))\r\n\r\nfollowers_text.close()\r\n<\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">First, let&#8217;s just create (or open if it already exists in the folder) a new .txt file. We want to name the file the username we&#8217;re trying to get the followers of followed by the date. So if we were to create a new file today of Silkstream&#8217;s followers, the file would be called:<\/p>\n<p style=\"text-align: center;\"><strong><span style=\"color: #ff6600;\">silkstreamnet-2014-06-27.txt<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\">So that&#8217;s pretty handy. And it means that if we were to generate a new .txt file each week of all the Twitter users we&#8217;re tracking, they&#8217;d all be ordered chronologically in our directory. Awesome.<\/p>\n<p style=\"text-align: justify;\">Now for the actual creation of the file&#8217;s text content. We can use followers_text.write() to write whatever text we want in the file. In this case, we want to just put a little text title at the top to say:<\/p>\n<p style=\"text-align: center;\"><strong><span style=\"color: #ff6600;\">silkstreamnet has 147 followers (2014-06-27):<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #ff6600;\"><strong>%s<\/strong>\u00a0<\/span>is like a string placeholder. So where there are three &#8220;string placeholders&#8221;, we&#8217;ll define in a minute what we actually want to insert into there.<\/p>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #ff6600;\"><br \/>\n<\/span>\u00a0<\/strong>means &#8220;new line&#8221;. So after we&#8217;ve put our little text title at the top, we want to start our actual list of followers two lines down, because we&#8217;ve put <span style=\"color: #ff6600;\"><strong><br \/>\n<\/strong><\/span> twice.<\/p>\n<p style=\"text-align: justify;\">So now let&#8217;s tell our program what we want to insert into our title! Instead of those placeholders we want to insert our username, the length of the followers list (that&#8217;s how many followers that user has) converted to a string, and the date converted to a string.<\/p>\n<p style=\"text-align: justify;\">And then that&#8217;s when we want to write out the usernames of all the followers in our list, joining each one with a new line so when they&#8217;re written to the text file, there&#8217;ll be one username per line.<\/p>\n<p style=\"text-align: justify;\">Finally, we want to remember to close the text file that we had open to save our changes. You should now see the .txt file in the directory you&#8217;re working out of! Perfect.<\/p>\n<h2 style=\"text-align: justify;\">How your final .txt program should look:<\/h2>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span style=\"color: #000000;\"><code>from twython import Twython, TwythonError\r\nimport datetime\r\n\r\napp_key = \"YOUR_APP_KEY\"\r\napp_secret = \"YOUR_APP_SECRET\"\r\noauth_token = \"YOUR_OAUTH_TOKEN\"\r\noauth_token_secret = \"YOUR_OAUTH_TOKEN_SECRET\"\r\n\r\ntwitter = Twython(app_key,app_secret,oauth_token,oauth_token_secret)\r\n\r\nfollowers = []\r\n\r\ndatestamp = datetime.datetime.now().strftime(\"%Y-%m-%d\")\r\n\r\nusername = raw_input(\"Retrieve Follower list of: \")\r\n\r\nnext_cursor = -1\r\n\r\nwhile(next_cursor):\r\n    get_followers = twitter.get_followers_list(screen_name=username,count=200,cursor=next_cursor)\r\n    for follower in get_followers[\"users\"]:\r\n        followers.append(follower[\"screen_name\"].encode(\"utf-8\"))\r\n        next_cursor = get_followers[\"next_cursor\"]\r\n\r\nfollowers_text = open(username+\"-\"+datestamp+\".txt\",\"a\")\r\n\r\nfollowers_text.write(%s has %s followers (%s):\n\n\" % (str(username),str(len(followers)),str(datestamp))+\"\n\".join(followers))\r\n\r\nfollowers_text.close()\r\n<\/code><\/span><\/pre>\n<\/div>\n<h2><\/h2>\n<h2><span style=\"font-size: 1.285714286rem; line-height: 1.6;\">Now let&#8217;s try something a little more complicated&#8230;<\/span><\/h2>\n<p style=\"text-align: justify;\">Although sometimes you really do just want to get hold of a quick list of your followers for whatever reason, most of the time you&#8217;re going to want something a little more in depth than just a list of their usernames&#8230;<\/p>\n<p style=\"text-align: justify;\">So let&#8217;s try creating a CSV spreadsheet file of your followers instead! This way we can add columns with different user details about our followers.<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span><code><span style=\"color: #000000;\">from twython import Twython, TwythonError\r\n<span style=\"color: #ff6600;\"># Need to import csv now too!<\/span>\r\nimport csv\r\nimport datetime\r\n\r\napp_key = \"YOUR_APP_KEY\"\r\napp_secret = \"YOUR_APP_SECRET\"\r\noauth_token = \"YOUR_OAUTH_TOKEN\"\r\noauth_token_secret = \"YOUR_OAUTH_TOKEN_SECRET\"\r\n\r\ntwitter = Twython(app_key,app_secret,oauth_token,oauth_token_secret)\r\n\r\n<\/span><span style=\"color: #ff6600;\"># This time we want to make several lists!<\/span><span style=\"color: #000000;\">\r\nnames = []\r\nusernames = []\r\nids = []\r\nlocations = []\r\nfollower_count = []\r\n\r\ndatestamp = datetime.datetime.now().strftime(\"%Y-%m-%d\")\r\n\r\nusername = raw_input(\"Retrieve Follower list of: \")\r\n\r\nnext_cursor = -1\r\n\r\nwhile(next_cursor):\r\n    get_followers = twitter.get_followers_list(screen_name=username,count=200,cursor=next_cursor)\r\n    for follower in get_followers[\"users\"]:\r\n<\/span><span style=\"color: #ff6600;\"># And add some more user details to its corresponding list<\/span><span style=\"color: #000000;\">\r\n        names.append(follower[\"name\"].encode(\"utf-8\"))\r\n        usernames.append(follower[\"screen_name\"].encode(\"utf-8\"))\r\n        ids.append(follower[\"id\"])\r\n        locations.append(follower[\"location\"].encode(\"utf-8\"))\r\n        follower_count.append(follower[\"followers_count\"])\r\n        next_cursor = get_followers[\"next_cursor\"]\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Instead of creating a .txt we want to create a .csv!<\/span><span style=\"color: #000000;\">\r\nopen_csv = open(username+\"-\"+datestamp+\".csv\",\"wb\")\r\n<\/span><span style=\"color: #ff6600;\"># And write to it...<\/span><span style=\"color: #000000;\">\r\nfollowers_csv = csv.writer(open_csv)\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Creating our top \"title\" row<\/span><span style=\"color: #000000;\">\r\nnames.insert(0,\"@%s has %s followers (%s)\" % (str(username),str(len(followers)),str(datestamp)))\r\nusernames.insert(0,\"\")\r\nids.insert(0,\"\")\r\nlocations.insert(0,\"\")\r\nfollower_count.insert(0,\"\")\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Give each column its own title<\/span><span style=\"color: #000000;\">\r\nnames.insert(1,\"\nDisplay Name\n\")\r\nusernames.insert(1,\"\nUsername (@)\n\")\r\nids.insert(1,\"\nUser ID\n\")\r\nlocations.insert(1,\"\nLocation\n\")\r\nfollower_count.insert(1,\"\n# of their Followers\n\")\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Merge all our lists together so that they line up<\/span><span style=\"color: #000000;\">\r\nrows = zip(names,usernames,ids,locations,follower_count)\r\n\r\n<span style=\"color: #ff6600;\"># Write each row one-by-one to our spreadsheet<\/span>\r\nfor row in rows:\r\n    followers_csv.writerow(row)\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Save and close our csv spreadsheet<\/span><span style=\"color: #000000;\">\r\nopen_csv.close()\r\n<\/span><\/code><\/span><\/pre>\n<\/div>\n<h2><\/h2>\n<h2>Creating our lists for all the followers&#8217; details<\/h2>\n<p>We can get a lot more details about each follower, but let&#8217;s just start with 5 to keep things simple:<\/p>\n<ul>\n<li><span style=\"color: #ff6600;\"><strong>Display Names<\/strong> <\/span>&#8211; The name that they go by (which they can change)<\/li>\n<li><span style=\"color: #ff6600;\"><strong>Usernames<\/strong> <\/span>&#8211; Their @username (which they can&#8217;t change)<\/li>\n<li><span style=\"color: #ff6600;\"><strong>IDs<\/strong><\/span> &#8211; The User ID number of the follower<\/li>\n<li><span style=\"color: #ff6600;\"><strong>Locations<\/strong> <\/span>&#8211; Where they have their location set to on their profile<\/li>\n<li><span style=\"color: #ff6600;\"><strong>Follower Count<\/strong> <\/span>&#8211; How many followers they currently have themselves<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">So we need to create an empty list for each of those user characteristics, so that we can store those details that we&#8217;ll get in a minute.<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span><code><span style=\"color: #000000;\">names = []\r\nusernames = []\r\nids = []\r\nlocations = []\r\nfollower_count = []<\/span><\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Next we&#8217;re going to do what we did with our .txt file, but we need to get the other user details too and, like how we appended them to our followers list before, we&#8217;re going to chuck those details into their own lists.<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span><code><span style=\"color: #000000;\">while(next_cursor):\r\n    get_followers = twitter.get_followers_list(screen_name=username,count=200,cursor=next_cursor)\r\n    for follower in get_followers[\"users\"]:<\/span><span style=\"color: #000000;\">\r\n        names.append(follower[\"name\"].encode(\"utf-8\"))\r\n        usernames.append(follower[\"screen_name\"].encode(\"utf-8\"))\r\n        ids.append(follower[\"id\"])\r\n        locations.append(follower[\"location\"].encode(\"utf-8\"))\r\n        follower_count.append(follower[\"followers_count\"])\r\n        next_cursor = get_followers[\"next_cursor\"]<\/span><\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">So for each follower we get back from <span style=\"color: #ff6600;\"><strong>get_followers<\/strong><\/span>&#8216; users we append the follower <span style=\"color: #ff6600;\"><strong>name<\/strong><\/span> to the <strong><span style=\"color: #ff6600;\">names<\/span><\/strong> list, the follower <span style=\"color: #ff6600;\"><strong>screen_name<\/strong><\/span> to our <strong><span style=\"color: #ff6600;\">usernames<\/span><\/strong> list, the follower <span style=\"color: #ff6600;\"><strong>id<\/strong><\/span> to <span style=\"color: #ff6600;\"><strong>ids<\/strong><\/span>, etc.<\/p>\n<h2>Making our CSV spreadsheet look all pretty<\/h2>\n<p>But certainly not our code&#8230;. &gt;.&lt;<\/p>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span><code><span style=\"color: #000000;\">open_csv = open(username+\"-\"+datestamp+\".csv\",\"wb\")<\/span><span style=\"color: #000000;\">\r\nfollowers_csv = csv.writer(open_csv)\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Creating our top \"title\" row<\/span><span style=\"color: #000000;\">\r\nnames.insert(0,\"@%s has %s followers (%s)\" % (str(username),str(len(followers)),str(datestamp)))\r\nusernames.insert(0,\"\")\r\nids.insert(0,\"\")\r\nlocations.insert(0,\"\")\r\nfollower_count.insert(0,\"\")\r\n\r\n<\/span><span style=\"color: #ff6600;\"># Give each column its own title<\/span><span style=\"color: #000000;\">\r\nnames.insert(1,\"\nDisplay Name\n\")\r\nusernames.insert(1,\"\nUsername (@)\n\")\r\nids.insert(1,\"\nUser ID\n\")\r\nlocations.insert(1,\"\nLocation\n\")\r\nfollower_count.insert(1,\"\n# of their Followers\n\")<\/span><\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">So, as we did with the text file, we need to open (or create if it doesn&#8217;t already exist in the working directory) a .csv file. We name it exactly how we named the text file before, so the filename will be<\/p>\n<p style=\"text-align: center;\"><span style=\"color: #ff6600;\"><strong>username-YY-MM-DD.csv<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #ff6600;\"><strong>followers_csv = csv.writer(open_csv)<\/strong><\/span> means that from now, we will refer to the csv file we&#8217;re writing to as <span style=\"color: #ff6600;\"><strong>followers_csv<\/strong><\/span> in the csv writer.<\/p>\n<p style=\"text-align: justify;\">So let&#8217;s create our top title row, with the very first cell in the very first row telling us how many followers our specified user has, accompanied with our date. Like we had in the top line of our text file. So we&#8217;re telling our program to insert that string in the names list as the very first item in the list (which is [0] as indexes start as 0 and not 1, remember?). The rest we&#8217;ll fill in with an empty string just to fill in the row&#8217;s blanks. The method&#8217;s a bit unimaginative to be honest, but it will do.<\/p>\n<p style=\"text-align: justify;\">So if our chosen username is silkstreamnet, the top line should read:<\/p>\n<p style=\"text-align: center;\"><strong><span style=\"color: #ff6600;\">@silkstreamnet has 147 followers (2014-06-27)<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\">Next, we want to do exactly the same thing with our second row (or [1] in each list) but this time we want to insert the column titles for each list.<\/p>\n<p style=\"text-align: justify;\">So in this example, we&#8217;ve chosen to title each column on the second row:<\/p>\n<ul>\n<li><span style=\"color: #ff6600;\"><strong>Display Name<\/strong><\/span><\/li>\n<li><span style=\"color: #ff6600;\"><strong>Username (@)<\/strong><\/span><\/li>\n<li><span style=\"color: #ff6600;\"><strong>User ID<\/strong><\/span><\/li>\n<li><span style=\"color: #ff6600;\"><strong>Location<\/strong><\/span><\/li>\n<li><span style=\"color: #ff6600;\"><strong># of their Followers<\/strong><\/span><\/li>\n<\/ul>\n<p>Using <strong><span style=\"color: #ff6600;\"><br \/>\n<\/span><\/strong> immediately before and after each title, we can pad out the title row a bit to make it stand out a bit more.<\/p>\n<h2>Shoving our followers&#8217; details in row-by-row&#8230;<\/h2>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span><code><span style=\"color: #000000;\">rows = zip(names,usernames,ids,locations,follower_count)\r\n\r\nfor row in rows:\r\n    followers_csv.writerow(row)\r\n<\/span><span style=\"color: #000000;\">\r\nopen_csv.close()\r\n<\/span><\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Let&#8217;s first understand what <span style=\"color: #ff6600;\"><strong>zip<\/strong><\/span> does. It literally &#8220;zips&#8221; lists together. For example:<\/p>\n<p>Say we have two lists:<\/p>\n<p style=\"text-align: center;\"><span style=\"color: #ff6600;\"><strong>list1 = [&#8220;1&#8243;,&#8221;2&#8243;,&#8221;3&#8221;]<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"color: #ff6600;\"><strong>list2 = [&#8220;a&#8221;,&#8221;b&#8221;,&#8221;c&#8221;]<\/strong><\/span><\/p>\n<p>If we zipped them both together with <span style=\"color: #ff6600;\"><strong>zip(list1,list2)<\/strong><\/span>, we would get:<\/p>\n<p style=\"text-align: center;\"><span style=\"color: #ff6600;\"><strong>[(&#8220;1&#8243;,&#8221;a&#8221;),(&#8220;2&#8243;,&#8221;b&#8221;),(&#8220;3&#8243;,&#8221;c&#8221;)]<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\">So in the zip&#8217;s parameters, we give it our lists that we want zipped (all of them in this case), and we&#8217;re calling this <span style=\"color: #ff6600;\"><strong>rows<\/strong><\/span>. Which makes sense as we&#8217;re going to fill our rows with this information. And by zipping the lists in this way, we&#8217;ve bunched the followers&#8217; details up so each follower has almost like a list of their own containing only their details.<strong><span style=\"color: #ff6600;\"><br \/>\n<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\">Next we&#8217;re saying that for each <strong><span style=\"color: #ff6600;\">row in rows<\/span><\/strong>, print that row to its own row. That&#8217;s a lot of rows!<\/p>\n<p style=\"text-align: justify;\">But ultimately, every follower (and all of their details that we&#8217;ve requested) will be written to its own row.<\/p>\n<p style=\"text-align: justify;\">Row. By. Row.<\/p>\n<p style=\"text-align: justify;\">And of course, don&#8217;t forget to close your .csv file when you&#8217;re done writing to it ;]<\/p>\n<h2>The final code should look something like this&#8230;<\/h2>\n<div style=\"border: dashed #f79239; padding: 8px;\">\n<pre><span style=\"color: #000000;\"><code>from twython import Twython, TwythonError\r\nimport csv\r\nimport datetime\r\n\r\napp_key = \"YOUR_APP_KEY\"\r\napp_secret = \"YOUR_APP_SECRET\"\r\noauth_token = \"YOUR_OAUTH_TOKEN\"\r\noauth_token_secret = \"YOUR_OAUTH_TOKEN_SECRET\"\r\n\r\ntwitter = Twython(app_key,app_secret,oauth_token,oauth_token_secret)\r\n\r\nnames = []\r\nusernames = []\r\nids = []\r\nlocations = []\r\nfollower_count = []\r\n\r\ndatestamp = datetime.datetime.now().strftime(\"%Y-%m-%d\")\r\n\r\nusername = raw_input(\"Retrieve Follower list of: \")\r\n\r\nnext_cursor = -1\r\n\r\nwhile(next_cursor):\r\n    get_followers = twitter.get_followers_list(screen_name=username,count=200,cursor=next_cursor)\r\n    for follower in get_followers[\"users\"]:\r\n        names.append(follower[\"name\"].encode(\"utf-8\"))\r\n        usernames.append(follower[\"screen_name\"].encode(\"utf-8\"))\r\n        ids.append(follower[\"id\"])\r\n        locations.append(follower[\"location\"].encode(\"utf-8\"))\r\n        follower_count.append(follower[\"followers_count\"])\r\n        next_cursor = get_followers[\"next_cursor\"]\r\n\r\nopen_csv = open(username+\"-\"+datestamp+\".csv\",\"wb\")\r\nfollowers_csv = csv.writer(open_csv)\r\n\r\nnames.insert(0,\"@%s has %s followers (%s)\" % (str(username),str(len(followers)),str(datestamp)))\r\nusernames.insert(0,\"\")\r\nids.insert(0,\"\")\r\nlocations.insert(0,\"\")\r\nfollower_count.insert(0,\"\")\r\n\r\nnames.insert(1,\"\nDisplay Name\n\")\r\nusernames.insert(1,\"\nUsername (@)\n\")\r\nids.insert(1,\"\nUser ID\n\")\r\nlocations.insert(1,\"\nLocation\n\")\r\nfollower_count.insert(1,\"\n# of their Followers\n\")\r\n\r\nrows = zip(names,usernames,ids,locations,follower_count)\r\n\r\nfor row in rows:\r\n    followers_csv.writerow(row)\r\n\r\nopen_csv.close()\r\n<\/code><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Run your program!<\/h2>\n<p>Type the username of who you want to get a follower list for.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1125\" alt=\"Follower list Twython\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/follower-list-twython.png\" width=\"343\" height=\"45\" \/><\/p>\n<p>Now check in the directory that you&#8217;re program is saved in, and your newly created (or newly edited) file should be sitting in there too!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1126\" alt=\"Silkstream CSV spreadsheet\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/silkstreamnet-csv-spreadsheet.png\" width=\"367\" height=\"21\" \/><\/p>\n<p>Try opening it!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1127\" alt=\"Separator Options CSV\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/separator-options-csv.png\" width=\"293\" height=\"155\" \/><\/p>\n<p style=\"text-align: justify;\">By default, your separator options should be set like it is in the screenshot above. Usually, if Comma is unchecked, you&#8217;re going to get weird formatting and everything&#8217;s going to be in a single column, separated by commas. It&#8217;s not called Comma Separated Values for nothing!<\/p>\n<h2 style=\"text-align: justify;\">Your Followers Spreadsheet! Yay! It&#8217;s alive!<\/h2>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1128\" alt=\"Silkstream Twitter Followers CSV\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/silkstream-twitter-followers-csv.jpg\" width=\"561\" height=\"127\" \/><\/p>\n<p style=\"text-align: justify;\">Yours should look like the screenshot above. Obviously in our screen shot we&#8217;ve blurred our followers. Even though it&#8217;s public data. But y&#8217;know&#8230;<\/p>\n<p style=\"text-align: justify;\">And you can even upload it onto Google Docs so you can have it available online!<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1129\" alt=\"Google Spreadsheet Silkstream\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/google-spreadsheet-silkstream.jpg\" width=\"433\" height=\"483\" \/><\/p>\n<p dir=\"ltr\" style=\"text-align: justify;\">Then you can do all sorts of cool things. Like sorting your spreadsheet of followers in descending order of influence, ranking those with the most followers themselves higher on your list (Z-A, and in our example our follower count is in Column E). Or you could sort your followers alphabetically, or by ID, or even by location!<\/p>\n<p dir=\"ltr\" style=\"text-align: justify;\"><strong>By no means is this the prettiest of code.\u00a0I know this is definitely not the cleanest way to do this. I could probably condense down huge chunks of code. But I&#8217;m still a Python\/Twython Noob, and you\u2019re just a Python\/Twython Noob (no offense) so I&#8217;m just trying to focus more on readability than how \u201cclean\u201d something is. It should still all function the same. Just probably not as written efficiently as it could be&#8230;<\/strong><\/p>\n<h3 style=\"text-align: center;\"><a title=\"Random Tweets with Twython\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/06\/random-tweets-with-twython.html\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1009 alignleft\" alt=\"How To Get Going With Twython\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/orange-arrow-left.png\" width=\"127\" height=\"120\" \/><\/a><a title=\"Random Tweets with Twython\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/06\/random-tweets-with-twython.html\">The Noob&#8217;s Guide to Twython &#8211; Part 3:<\/a><\/h3>\n<p style=\"text-align: center;\"><a title=\"Random Tweets with Twython\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/06\/random-tweets-with-twython.html\"><strong>Random Tweets with Twython<\/strong><\/a><\/p>\n<h3 style=\"text-align: center;\"><a title=\"Tweeting Edited Images with Twython\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/08\/tweeting-edited-images-with-twython.html\">The Noob&#8217;s Guide to Twython &#8211; Part 5:<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1010 alignright\" alt=\"\" src=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/orange-arrow-right.png\" width=\"127\" height=\"120\" \/><\/a><\/h3>\n<p style=\"text-align: center;\"><a title=\"Tweeting Edited Images with Twython\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/08\/tweeting-edited-images-with-twython.html\"><strong>Tweeting Edited Images with Twython<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\nWelcome to the fourth installment of The Noob&#8217;s Guide to Twython, where we&#8217;re playing around with the Twitter API with Python, using the Twython <\/p>\n","protected":false},"author":7,"featured_media":1133,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-1064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-online-marketing","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Playing with Followers with Twython - Silkstream | Web Design blog<\/title>\n<meta name=\"description\" content=\"The fourth part of our Noob&#039;s Guide To Twython, where we will be playing with lists of followers in .txt and .csv spreadsheets for later analysis.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Playing with Followers with Twython - Silkstream | Web Design blog\" \/>\n<meta property=\"og:description\" content=\"The fourth part of our Noob&#039;s Guide To Twython, where we will be playing with lists of followers in .txt and .csv spreadsheets for later analysis.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html\" \/>\n<meta property=\"og:site_name\" content=\"Silkstream\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/silkstream\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-27T13:37:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-09-05T14:55:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/twython-guide-thumb-4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"120\" \/>\n\t<meta property=\"og:image:height\" content=\"120\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ria\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@RiaLolwut\" \/>\n<meta name=\"twitter:site\" content=\"@silkstreamnet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ria\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html\"},\"author\":{\"name\":\"Ria\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/#\\\/schema\\\/person\\\/1516b66b9d6da001d8052655282481b1\"},\"headline\":\"Noob&#8217;s Guide #4: Playing with Followers with Twython\",\"datePublished\":\"2014-06-27T13:37:52+00:00\",\"dateModified\":\"2014-09-05T14:55:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html\"},\"wordCount\":1912,\"commentCount\":10,\"image\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/twython-guide-thumb-4.jpg\",\"articleSection\":[\"Online Marketing\",\"Tutorials\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html\",\"url\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html\",\"name\":\"Playing with Followers with Twython - Silkstream | Web Design blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/twython-guide-thumb-4.jpg\",\"datePublished\":\"2014-06-27T13:37:52+00:00\",\"dateModified\":\"2014-09-05T14:55:46+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/#\\\/schema\\\/person\\\/1516b66b9d6da001d8052655282481b1\"},\"description\":\"The fourth part of our Noob's Guide To Twython, where we will be playing with lists of followers in .txt and .csv spreadsheets for later analysis.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#primaryimage\",\"url\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/twython-guide-thumb-4.jpg\",\"contentUrl\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/twython-guide-thumb-4.jpg\",\"width\":120,\"height\":120,\"caption\":\"Noob's Guide to Twython\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/2014\\\/06\\\/playing-with-followers-with-twython-csv.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.silkstream.net\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Noob&#8217;s Guide #4: Playing with Followers with Twython\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/\",\"name\":\"Silkstream\",\"description\":\"Here you&#039;ll find the latest blogs, white papers and case studies from Silkstream experts.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.silkstream.net\\\/blog\\\/#\\\/schema\\\/person\\\/1516b66b9d6da001d8052655282481b1\",\"name\":\"Ria\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dad9acd650d88d7fd9c7e2b77f38d25ec2c921eb7efb622d785820719d8a75df?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dad9acd650d88d7fd9c7e2b77f38d25ec2c921eb7efb622d785820719d8a75df?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dad9acd650d88d7fd9c7e2b77f38d25ec2c921eb7efb622d785820719d8a75df?s=96&d=mm&r=g\",\"caption\":\"Ria\"},\"description\":\"SEO &amp; Internet Marketing addict, and aspiring crazy cat lady.\",\"sameAs\":[\"http:\\\/\\\/www.silkstream.net\",\"https:\\\/\\\/x.com\\\/RiaLolwut\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Playing with Followers with Twython - Silkstream | Web Design blog","description":"The fourth part of our Noob's Guide To Twython, where we will be playing with lists of followers in .txt and .csv spreadsheets for later analysis.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html","og_locale":"en_GB","og_type":"article","og_title":"Playing with Followers with Twython - Silkstream | Web Design blog","og_description":"The fourth part of our Noob's Guide To Twython, where we will be playing with lists of followers in .txt and .csv spreadsheets for later analysis.","og_url":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html","og_site_name":"Silkstream","article_publisher":"https:\/\/www.facebook.com\/silkstream","article_published_time":"2014-06-27T13:37:52+00:00","article_modified_time":"2014-09-05T14:55:46+00:00","og_image":[{"width":120,"height":120,"url":"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/twython-guide-thumb-4.jpg","type":"image\/jpeg"}],"author":"Ria","twitter_card":"summary_large_image","twitter_creator":"@RiaLolwut","twitter_site":"@silkstreamnet","twitter_misc":{"Written by":"Ria","Estimated reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#article","isPartOf":{"@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html"},"author":{"name":"Ria","@id":"https:\/\/www.silkstream.net\/blog\/#\/schema\/person\/1516b66b9d6da001d8052655282481b1"},"headline":"Noob&#8217;s Guide #4: Playing with Followers with Twython","datePublished":"2014-06-27T13:37:52+00:00","dateModified":"2014-09-05T14:55:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html"},"wordCount":1912,"commentCount":10,"image":{"@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#primaryimage"},"thumbnailUrl":"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/twython-guide-thumb-4.jpg","articleSection":["Online Marketing","Tutorials"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html","url":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html","name":"Playing with Followers with Twython - Silkstream | Web Design blog","isPartOf":{"@id":"https:\/\/www.silkstream.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#primaryimage"},"image":{"@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#primaryimage"},"thumbnailUrl":"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/twython-guide-thumb-4.jpg","datePublished":"2014-06-27T13:37:52+00:00","dateModified":"2014-09-05T14:55:46+00:00","author":{"@id":"https:\/\/www.silkstream.net\/blog\/#\/schema\/person\/1516b66b9d6da001d8052655282481b1"},"description":"The fourth part of our Noob's Guide To Twython, where we will be playing with lists of followers in .txt and .csv spreadsheets for later analysis.","breadcrumb":{"@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#primaryimage","url":"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/twython-guide-thumb-4.jpg","contentUrl":"https:\/\/www.silkstream.net\/blog\/wp-content\/uploads\/2014\/06\/twython-guide-thumb-4.jpg","width":120,"height":120,"caption":"Noob's Guide to Twython"},{"@type":"BreadcrumbList","@id":"https:\/\/www.silkstream.net\/blog\/2014\/06\/playing-with-followers-with-twython-csv.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.silkstream.net\/blog"},{"@type":"ListItem","position":2,"name":"Noob&#8217;s Guide #4: Playing with Followers with Twython"}]},{"@type":"WebSite","@id":"https:\/\/www.silkstream.net\/blog\/#website","url":"https:\/\/www.silkstream.net\/blog\/","name":"Silkstream","description":"Here you&#039;ll find the latest blogs, white papers and case studies from Silkstream experts.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.silkstream.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.silkstream.net\/blog\/#\/schema\/person\/1516b66b9d6da001d8052655282481b1","name":"Ria","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/dad9acd650d88d7fd9c7e2b77f38d25ec2c921eb7efb622d785820719d8a75df?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dad9acd650d88d7fd9c7e2b77f38d25ec2c921eb7efb622d785820719d8a75df?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dad9acd650d88d7fd9c7e2b77f38d25ec2c921eb7efb622d785820719d8a75df?s=96&d=mm&r=g","caption":"Ria"},"description":"SEO &amp; Internet Marketing addict, and aspiring crazy cat lady.","sameAs":["http:\/\/www.silkstream.net","https:\/\/x.com\/RiaLolwut"]}]}},"_links":{"self":[{"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/posts\/1064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/comments?post=1064"}],"version-history":[{"count":69,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/posts\/1064\/revisions"}],"predecessor-version":[{"id":1558,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/posts\/1064\/revisions\/1558"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/media\/1133"}],"wp:attachment":[{"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/media?parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/categories?post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silkstream.net\/blog\/wp-json\/wp\/v2\/tags?post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}