Sometimes you want Twitter usernames to use in a marketing campaign. Maybe for a Twitter Ad campaign or even a nefarious purpose (hey, I’m not judging!), sometimes you just need a basic list of usernames. But you don’t have the time to go to Twitter.com and copy/paste each name.
But good news – you don’t need anything but a browser and good old Excel. It’s a simple 5 step hack that I’ve been using for quite a while. I’ve told a few about it in conversation, and it’s often a, “oh wow – that’s so obvious!” type of response. Since I’m a fan of keeping everything simple, I thought it was worth sharing.
Let’s say I want to create a Twitter Ad campaign targeted at an audience who shops for guitar equipment online. Let’s then say I identified the followers of @guitarcenter to be a great audience for my needs. Finally, let’s say my need is gathering up a simple .csv file to upload to Twitter Ads’ Tailored Audience module (thus allowing me to send my ad only to my selected users).
Track down the followers page for Guitar Center. At this time, they have 185k followers. Wow. You’ll notice as you scroll down, Twitter starts loading in the next row of results (you’ll see a sort of “pop in” effect). Have a wheel on your mouse? Use it to keep scrolling until you feel you have enough users loaded on the page. These are the users we’re going to pull off the page. (I’ll be honest, this can get boring if you’re looking for a long list).
Next we’re going to copy all the contents on the page – all the text and pictures – with cntrl-A on Windows. All the text and pictures should highlight. Next, we hit cntrl-C to copy everything that’s highlighted.
With the rendered text in your clipboard, you’re going to move over to Excel. Right-click on A1, choose “paste special,” and choose HTML as the final option.
If you’ve copied a lot, this is going to get your computer cooking. It might take a while (depending on processor and RAM), but you’ll eventually see all your copied items in a globulous mess (like the below):
The truth is, everything pasted into the first column. This is good! By using filters, we can easily clear out everything but your usernames.
Highlight your column, and turn your A1 cell into a filter (Data > Filter), and click your newly created dropdown.
Next, you’ll want to filter by “begins with,” to which you’ll simply enter the “at symbol” as shown below. Click OK.
At this stage, your A column is sorted, but the messy images may still be obstructing you. Simply copy all the usernames out of column A and paste into a new sheet. The images shouldn’t go with you.
Spot check your list. Sometimes you’ll get some anomalies. For example, if a user is following you, you’ll get something like @billsebald Follows You. That’s easy enough to fix en masse – use the “text to columns” feature to parse out the text after a space.
That’s really all there is to it. Hacky? Yes. Quick and dirty for those who don’t have advanced tools? Yes. Your final list should look like this:
There are other ways to import HTML into Excel, but don’t underestimate the power of a simple copy and paste!