Automate iTunes Store Affiliate Links with TextExpander

I was looking for a method to make the generation of affiliate links to the iTunes Store less painful. My searching led me to this official Apple resource for generating less spammy-looking links, and it all made sense until I got to the part where it told you to “double percent-encode the plain App Store link”.

I’m no coder, but I am good at reverse-engineering code. But now I needed a script that did this double percent-encoding, and that was just the first step—I would still need to put together the full link in the end. But for now I was at an impasse. 

Some further Googling led me to this page by the mysterious Dr. Drang, which turned out to be the “Holy Grail” Python script needed to generate iTunes affiliate links and handles all the code mumbo-jumbo to double-percent-encode the basic link. The script generates the full affiliate link and pastes it where needed. Even better, it was designed to work with TextExpander. It also follows my Digital Productivity Rules.

As Drang points out on the page, this link generator will not include any of that spammy-looking LinkShare crap in the link, but it also means you get no link tracking. But he’s got an earlier version of the script which does just that if you want it. Me, I wanted something clean that indicated to viewers where the link was taking them.

Simpler Apple affiliate linking – All this. Thanks, Dr, Drang!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s