Juhannus Kainuussa – Eino Leino
Juhannus
Minä avaan syömeni selälleen
ja annan päivän paistaa,
minä tahdon kylpeä joka veen
ja joka marjan maistaa.Minun mielessäni on juhannus
ja juhla ja mittumaari,
ja jos minä illoin itkenkin,
niin siellä on sateenkaari.
Eino Leino
Nocturne
Ruislinnun laulu korvissani
tähkäpäiden päällä täysi kuu;
kesä-yön on onni omanani,
kaskisavuun laaksot verhouu.
En ma iloitse, en sure, huokaa;
mutta metsän tummuus mulle tuokaa,
puunto pilven, johon päivä hukkuu,
siinto vaaran tuulisen, mi nukkuu,
tuoksut vanamon ja varjot veen;
niistä sydämeni laulun teen.Sulle laulan neiti, kesäheinä,
sydämeni suuri hiljaisuus,
uskontoni, soipa säveleinä,
tammenlehvä-seppel vehryt, uus.En ma enää aja virvatulta,
onpa kädessäni onnen kulta;
pienentyy mun ympär’ elon piiri;
aika seisoo, nukkuu tuuliviiri;
edessäni hämäräinen tie
tuntemattomahan tupaan vie.
Eino Leino
48 Virtues for Business and Joyful Life
Learn and develop highest virtues, that you can practice on every day life to make your own and surrounding life better and more joyful. Here I will concentrate on business oriented virtues on commentary just to show one possible way to apply practicing virtuous life in that context.

1. Ability
2. Acceptance
3. Beauty
4. Bravery
5. Caution
6. Charism
7. Cleanliness
8. Clearness
9. Creativity
10. Curiosity
11. Deference
12. Defiance
13. Determination
14. Devotion
15. Discretion
16. Flexibility
17. Fitness
18. Focus
19. Foresee
20. Forgiveness
21. Frugality
22. Generosity
23. Gentleness
24. Gratitude
25. Humility
26. Humor
27. Industry
28. Justice
29. Indepencence
30. Kindness
31. Majesty
32. Moderation
33. Obedience
34. Openness
35. Optimism
36. Order
37. Patience
38. Resolution
39. Silence
40. Sincerity
41. Spontaneity
42. Temperance
43. Tranquility
44. Trust
45. Trustworthiness
46. Understanding
47. Unselfishness
48. Wisdom
See also these writings from my blog:
Google Arbitrage – Still applicable?
Definition of arbitrage
Arbitrage in general is a method of taking advantage of the fact that there may be different prices in different markets for identical goods such as gold, foreign exchange or commodities. Simultaneously, one buys in the lower price market and sells in the higher one. For forex trading and sports trading there are some software that can help in this business, but in this article i will explain, what Google Arbitrage is and how you can start with it. I think its a good idea to make it work manually first, so that you can grasp the idea and basics and then for more serious work you can get some additional time saving tools like ebooks and software.
After some experiments with Google advertising (Adwords & Adsense), i noticed one interesting thing, that could be a way to make some profit online. It took two weeks or some to make tests, deeper research and fine tuning the technique once i accidentally found from the net that technique is called Google Arbitrage.
You will need basic knowledge, what Adsense and Adwords are or what they mean, so i recommend to see Google’s introduction page, if you are not familiar with these terms or setup.
Let me first show by a simple picture, what this is all about:

Interpreting from left, you use money to create and show ads primary on Google content sites (historical launch of separate content pricing) and secondary on Google organic search results (Adwords). Ads directs users to the sites, where you have placed sponsor ads (Adsense). Second dollar means, that you probably need to invest some money for creating and hosting websites, where you put your sponsor ads. Now, when visitors clicks sponsor ads you get money depending on how much they have bid for the ad keywords. If keywords on your sites are well choosen and high paying, then the ads, that are shown are also the most probably high paying. So as a result you can get more money from sponsor ads than you are spending on your own ads (3$ – 2$ = 1$).
This is a simple strategy to be understood, but based on my own experience, it is not so easy to implement. First of all, you absolutely need some money to get started and either good experience on marketing or good tools for finding right keywords. And without good luck you need to prepare to spend some time and money on testing and fine tuning the best combinations, ad positions, keywords density etc.
Basically, if going into the technical details, main purpose is to find minimum cost per click (CPC) and maximum click through rate (CTR) for your own ads simultaneously getting maximum CPC and maximum CTR from your sponsor ads.
This raises three questions, that by getting good answers should help to achieve better results in Google Arbitrage:
- How to find high paying keywords?
- How to get smallest possible CPC for your own ads?
- How to optimize page for sponsor ads?
1. How to find high paying keywords?
In this method you get money from users clicks to sponsors ads. Money coming from this source, must exceed both your own adverticing plus hosting. Because you get only some percentage of the price sponsor bids on his ads and you pay 0.03 – 0.05 (0.04 on avarage), you have a straight equation here:
(N % of sponsor bid * clicks) – (0.04 * clicks + hosting) = profit
That should show clearly, that you need to find keywords, that are priced far beyond 0.04, because not every click convert to money. Fortunately there are thoussands of keywords, that are paid several dollars, some even up to 70 dollars!
For finding right keywords you can use common sense and reasoning plus some tools, that are specially made for for high keyword hunting. All finance subjects are fine as well as lons, law, jewelry, web hosting etc. to mention some. But real key to the success is to find more specific, less general keywords, that still have a good search volume. If the keyword is too general, you never know what sort of people are coming to your site, what they have in mind really. But if you choose less common niche keyword and tie it to your ads, you can be more sure, what people are looking for and that way you can serve them better.
We really can talk about serving. Not just because we deliver web pages through machine called server, but because what we are actually doing here, is that we serve people by giving them appropriare information and references, where to find more information. We suggest them related products and services.
To shorten research gap, you can subscribe to several online services or buy some applications like KeyCompete, that makes everything much simplier. I have listed keyword research tools on another occasion, so you should look at there for more information.
2. How to get smallest possible CPC for your own ads?
This is the simplest and most straight forward part of the job actually. On Adwords you can bid on single keywords and also get listed on content ads. As you have found and used the most high paying keywords, its no sense, if you have to pay same price for each keyword to get people on our site. You would be losing money certainly.
The secret is, that you put very minimal money bid for each keyword and then fine tune the content ad price. I have found, that if i put price to 0.05, my ads are shown on content sites at very reasonable rate. Sometimes I can drop price to 0.04 even 0.02 and get ads still rolling. You won’t probably get much impressions and hits from Google organic results because you set keyword price as low as 0.05. People coming from organic results are often more quality traffic, but you can be quite sure, that people coming from content sites are also quite quality traffic. People are coming to your site, because they got interested and influenced by your ad, which was shown on meaningful and relevant content as accurately as keyword specific ads are shown on your site! You see.
By analyzing servers stats and visitors you can get even more important information, what people are for in your site. Setting up a poll an also be a good idea.
There are different schools, that emphasis opposite tactics for setting own bids. Tactic talked here aims for straight and maximum conversion rate with MINIMUM cost. Another tactic would be to bid maximum required money to get highest position on organic result and that way get all possible traffic to your site. In this case you need to find another method to make money, because Adsense revenue is just not enought to compensate used money. But if this approach interests you, you can find a good course called Get Google Ads For Free, that teaches how to find and use other adverticers to your site to compensate own adverticing debit. Sometimes i have also found important to make research about other adverticers bidding on adword. No suprise, there are applications for such work also like PPC Web Spy and Adword Accelerator.
3. How to optimize page for sponsor ads?
This is really tough question because there are so many variables, that affect to the result. It is easy to find, that creating wonderful content is a two edged sword. On the other hand, it should have as much new and pleasant content as possible, but as much from profit point, purpose is, that user clicks relevant ads, which makes money for publisher. If you use too much outgoing links, have disturbing non-relevant content or in some cases attract people too much, then there are more changes, that user does not click the ads. They perhaps clicks back button or closes the window. In addition to that it is said in Google Terms of Usage (TOS), that you are prohibited to tell people to click ads. Google just tries to make sure, people, which clicks the ads are really interested of the content that is adverticed.
So in theory optimal page has the information user is searching and has ads, which are the next thing, user is interested to click. But there are some fundamental principles, that should be stated to make Google Arbitrage method more clear.
You learned from the equation, that it is not enough to get people on your site. It is the conversion rate (CR) that counts after all. Better the conversion rate is, more the people clicks your site ads and more you profit. Let’s make another calculation here: You get 100 people to your site. Each have clicked your ads priced 0.04 on avarage so it makes 100*0.04 = 4.0 = money, that you have used adverticing.
You can expect anything between 0.5-30% conversion rate from your site. If you get 20 people of 100 clicking you sponsor ads (20% CR) and you get 0.2 per one click, then your total income is 4.0. We are at zero now! This means also, that we can play with three variables: CPC of your own ads (0.03-0.06 for example), CR (0,5-30% for example) and CPC of sponsor ads (0.2 for example).
Ultimate point of optimizing page is to increase conversion rate and getting high paying ads. There are several things, that are commonly experienced as good thigs for getting these two aspects better:
- disable borders, blend ads with content
- use either blue links or blend link title color with site style
- don’t use images
- give returning, loyal users ad free access to your services
- study and use channels for tracking and fine tuning
- place ad on high left side of the page content, 250*250 size seems to work well
- use horizontal and vertical link groups
- use ads on exit pages
How many pages, how much content, how many ads, text or images etc. these can’t be given exact answers. It depends on subject, target visitors, their behaviours and expectations. I recommend systematic tests using several combinations, changing them after some days and comparing results.
I didn’t joke when telling this is a tough question. You really need to experiment with right combination and layout. If you’re using WordPress as your blogging platform, you can have nice set of optimized layouts and themes, which work well with adsense ads. All this can some time and bux too, but good thing is, that it does not cost much to start and you can be quite sure, you will anyway get some of the used money back if following these safe guidelines. At the end of the article there is a tip, how you can get your first week or two free with Adwords, if you budget about $5/day.
Of cource by adding affiliate links and selling ads places to third parties you can expand possibilities, but that is an another subject.
Closing the case
I hope this has explained Google Arbitrage basics. This is a collection of information, that i have gathered through my own testing and reading several ebooks and people experiences on forums conserning the subject.
There are some pros and cons in Google Arbitrage. Good things are, that a) you get fast results and data for later marketing purposes, b) you’ll get real and valuable traffic to your site. This will affect to your site ranking as well.
Cons are, that ONE page and site probably does not give much profit, so you need to set up several sites to get reasonable monthy income. If you feel comfortable with this, you may become even more excited, when you hear, that there are some softwares, that are made specially to help and automize the process of creating a lot of niche sites. Keyword Elite was mentioned earlier. Another excellent program is HyperVRE. Both contains article search, spinning and processing, keyword analyzing and competition features, that really can help not only in this particular niche business but on internet business overall!
Another genre of useful tools are used to analyze Adsense data. Adsenselog and AdsenseTracker comes crucial, when you have dozens of sites and hundreds of adsense codes. They are not directly meant for profitting but log and analyze clicks and income stream. This data then can be used to pimp up adsense codes for better results.
As mentioned earlier, this is only one possible way of making money with ads. I would say, its not easy, but its not overwhelming hard. You need to know how to use computer, internet and some applications. When you have repeated the procedure, you will be quicker and more productive. To become really proficient in online marketing business, I recommend to combine SEO and PPC tactics as well as using traffic exchanges, safe lists, adverticing and affiliate market places.
Start up tips
You can get a coupon for Adwords marketing and get 50$ as a start up money after first deposit. Minimum deposit is 10$. You need to use coupon before creating and showing ads, because it is not eligable after that. I can tell you, that it is a good amount of money for getting in touch and practicing with Adwords marketing. This means you are on a secure way to get your first real dollars from marketing.
I had my first Adwords account from 2004 and i had made is with euro (€) currency. My Adsense account has always been on dollars ($). Soon i realized, that minimum bid could be same both in euros and dollars. Because of money conversion rate, it is cheaper to use dollars than euros! I made an another Adwords account with dollars currency and nasty thing is, that now i can get same traffic bidding $0.05 that i was earlier getting with 0.05€. Perhaps there are even better options for account currency.
Famous final words are in place here. Using Google Arbitrage has to meet some standards placed by Google or they will punish publishers by closing accounts. So when using this technique, make sure, that pages are not violating Google TOS. Careful thinking should also be considered for ethics involved with this issue. Clicking an ad costs advertiser, so making people clicking ads without real interest is suspicious manipulation. And if you are either afraid of using this method on your site or just curious about other possible ways to monetize or make money with blogging, you may be interested of WordPress Adsense System.
CPA Marketing Woes
Last Friday I got a phone call from one of my CPA network manager, who just wanted to know, how is it going and if they can do something for me. It is nice to get such calls which makes a kind of personal relation with your network company. I have made some tests with CPA marketing and I am making a master plan at the moment, because I can clearly see from my test campaigns that there is a change for average Internet user to profit and actually with a help of right tools, community and relationships I’m sure one can create whole six to seven figure business around this special type of marketing.
For those who do not know, CPA stands for Cost Per Action and is easily understandable if you compare it to normal affiliate marketing. Normally you get commission from sale per product. But with CPA offers you get commission per action that equals to commission per lead. So every time user fills a form, which can be as short as email or zip field submit, every time CPA marketer or promoter gets lead commission. Price tag can start from $.5 to $30, but with email and zip submits you get normally between $1 to $2. There are a punch of special things you need to know with CPA marketing business, but right at the moment, I just want to make a short look up to this business opportunity.
Controversial
One crucial difference between affiliate marketing and CPA marketing using PPC advertising comes from the fact, that you can track keywords and fine tune / optimize them only IF you get a lot of clicks AND conversions. I have seen a lot of videos, that shows you how to get some hundreds or thousands dollars with affiliate marketing, but they have a common flaw. They present about 100 clicks and one or couple of sales with high paying products. There is no sense to do much of optimizing with such numbers. You need a lot more clicks and conversions before you can fine tune the campaigns. Other flaw relates to the same lack of statistics. You could have made couple of more sales with good luck, but with bad luck you could have made zero sales, which means you lose maybe $100 to advertising. I’m sure, there are a lot more people, that has lose money that way rather than earned. At the end it is like lottery, you may get something back or may not to present it a little controversial way.
So my conclusion with successful PPC marketing is that building a business with it, you need to get a good amount of traffic, clicks and conversions per day. It is clear, that with products that costs $500 and you make sale or two on short product launch days, that is just not enough for business optimization. So one choice is to choose totally different arena and start promoting CPA offers. Now it easy to realize, that making people to give their zip code or email is lot more easy than make them spend money. People who use Internet and search engines are more toward getting information than using money with every page view or click. So it totally makes sense that you can get a lot of clicks and conversions with CPA offers. Now the most important things is that CPA marketer needs to have some tools to track, which offers, ads, keywords and even networks makes profit and which do not. While I started my initial testing using pen and paper, then moved to spreadsheet I was forced to see that making this method work for more than a hobby, I’m going to need a better automation tool. After a little search I found, that just recently such a tool was presented with a name StatsJunky. It seems to support endless list of affiliate networks, which is good news for professionals. Often CPA offers just stops or changes so, that you need to find similar offer from other networks.
While there are some web based keyword tracking tools online like Prosper202 and Adolix , there are some reasons you want to use client application. One is, that client is always performing and responding better than web interface because it uses computer processor and memory more efficiently. Other reason is, that you want to keep you stats and campaign information yours only and not give even a change to spread them to other competitors or networks.
Why to start manually?
For myself, I’m very careful using money until I have found, that some tool or service is really necessary and works for me. That’s why I always start with manual tracking and manual research and I also recommend it for others because it is the only way to get deep into the functionality and principles of any marketing method. After you know principals and you have detailed information, then you can apply knowledge, use your creativity and imagination and sometimes even find possibilities, that are practically untapped on some markets. If you get everything bitten and ready you may have difficulties to become independent and creative marketer.
On near future I’m planning to publish more specific article about CPA marketing that should help understand it better and help starters actually get into that business. Why I think it would benefit many users is, that even there are good commercial courses and some famous CPA marketers like Gauher Chaudhry, you will find that they are quite spicy and price to get involved into. Starting CPA marketing is not that hard and do not require big investments at all.
Getting hands dirty with Python and Twitter
Dare we dive deep into the world of Twitter and use special methods, that helps to get most of this phenomenal new media? If you are somewhat technically oriented, can do or are willing to learn some programming, then you might find next few lines interesting and helpful.
Often programmers and marketers are from different planet. They don’t share common language to communicate and they have different motives to look any media. But it’s not always the case. I have also seen, that those who start from technical background sometimes grow up to the most powerful marketers on their market. That is easy to understand, because they are not very easily tricked with monkey business and they also collect extra respect because of their experience on their niche. Good example from current Internet world is Brad Callen, that has quite good reputation as a software developer, but I’d also say he is well known and skilled marketer, probably very successful too. Anyone who has read his reports about keyword research and found links to his products from there, knows what I’m talking about. Brilliant stuff to learn in many ways.
I’m a big believer of holistic and unitive methods, so I courage everyone to learn at least basics of programming. Here I’m going to show quite generally, how to use Python to interact with your Twitter account. Specific instructions are impossible to give, because of variance of current sets of people systems.
Let’s get started
First you need a computer with Python installed. Most modern *nix based operating systems has it already, so this part is straight forward. In case you don’t have Python or you want to get the newest one, just go to http://www.python. org and select your operating system to download correct version of Python.
Second you need to download simplejson-2.0.9.tar.gz and python-twitter-0.5.tar.gz libraries. They are packed files, so you need to extract them to your computer. Often double clicking the package will do it.
Third part is to install those two packages. Latest now, you need to use console to interact with Python. For Linux and Unix users this is familiar, but not all Mac or Win users have used text based interface. On Mac you should open application called “Terminal” and on Windows, you’ll get necessary instructions, when you run Python installer for the first time.
Using $ cd command you need to find into the simplejson and python-twitter packages (their root location). For example $ cd ~/Downloads/python-twitter/ Then you need to run installer for both packages from their root location, for example $ python setup.py install. You could also run setup file from your home directory like: $ python ~/Downloads/python-twitter/setup.py install
Interact!
Now we are ready to use application interface to interact with Twitter. Basically you can do all the same actions from your Python shell, than you do from Twitter web interface and it is good to start trying those basic actions. Start up Python, import twitter library, connect to your Twitter account and call some function, that interacts with your Twitter account:
$ python >>> import twitter >>> api = twitter.Api(username='your_twitter_username', password='********') >>> api.PostUpdate('I love python-twitter!')
Want more friends?
But it wouldn’t be fun, if you can do only same things with Python you do with web interface. Here it is good to realize that actually all the hundreds of Twitter applications you see people using, are the result of programmers imagination and creativity to use similar APIs, we are using here. Programming is often used to automate and make some tasks easier. Next I’ll present one little python script and one small library, that creates relationships with a big list of people. I have generated that list in such way that those people are quite likely to follow you back, or at least they will result some of their followers to follow you. I’d recommend to use new Twitter account to experiment with this technique, then collect your own list of people for selected niche and start building your network of interesting people. I got whoppy of 500 followers in 24 hours with this method only.
#!/usr/bin/python # file: create_friends.py # use this like: $ python create_friends.py import twitter api = twitter.Api(username='your_twitter_username', password='********') # Top xxx Twitter Users Who Will Follow You Back: http://socialnewswatch.com/top-twitter-users/ # Plus people that responded to that post and want to follow you back. Generated 11/04/2009. # Other list of people to start with: http://www.facebook.com/topic.php?uid=2231777543&topic=5541&start=3600&hash=91d544cb81bb2a49d6eba177d7bf7212#topic_top friends = ["barackobama", "downingstreet", "theonion", "guykawasaki", "starbucks", "scobleizer", "bigrichb", "astronautics", "caseywright", "perrybelcher", "alohaarleen", "nansen", "thebusybrain", "robmcnealy", "michaemillman", "zaibatsu", "wbaustin", "jonathan360", "hashtags", "thedigitallife", "andrew303", "espn", "mrsocial", "chrispirillo", "stejules", "davemalby", "eleesha", "craigteich", "stephenkruiser", "jerell", "bradhoward", "foodimentary", "scotmckay", "edstivala", "rockingjude", "shannonseek", "radioblogger", "mikeklingler", "ronniewilson", "dantanner", "mikepfs", "techxav", "socialmediaclub", "flwbooks", "kamper", "andrewwindham", "oliver_turner", "_samjones", "kmesiab", "mark33", "stanleytang", "barefoot_exec", "jackbastide", "nichetitans", "marketingzap", "praguebob", "twitter_tips", "twitpic", "00joe", "jeanettejoy", "ohhdlinfo", "mariaandros", "jeanlucr", "tmaduri", "twitlive", "imogenheap", "newmediajim", "markdavidson", "openzine", "bryantsmith", "tysonthequick", "drjeffersnboggs", "jayoatway", "upicks", "gemstars", "michddot", "sethsimonds", "jessenewhart", "zefrank", "richcurrie", "karlrove", "sitepointdotcom", "ipodiums", "alexkaris", "holeinhiseye", "pistachio", "oudiantebi", "dsmpublishing", "petersantilli", "orrin_woodward", "queenoftheclick", "stocktwits", "marketingprofs", "marismith", "marcwarnke", "debbas", "steveweber", "tuaw", "kikivaldes", "waynemansfield", "usbargains", "rex7", "coffeetweet", "larrylanier", "julieroy", "jamesrivers", "mikefilsaime", "montaignejns", "seanmalarkey", "webaddict", "larrybrauner", "leplan", "aaronmartirano", "jeffpulver", "teedubya", "dcrblogs", "shawnrobinson", "konaendurance", "tradinggoddess", "johnreese", "infadelsarecool", "techhie", "nabbit", "diyanaalcheva", "unmarketing", "meteorit", "trafficgen", "staffinseconds", "peterdrew", "littlequiz", "teddyshabba", "dawudmiracle", "rightwingnews", "outsidemybrain", "dollars5", "mediabistro", "adnagam", "coasis", "nicholaspatten", "alexisneely", "everywheretrip", "e_stampede", "christianfea", "mojojuju", "emom", "rizzotees", "anexemines", "americanelement", "travisgreenlee", "rickysantos", "pawluxury", "kriscolvin", "pinkelephantpun", "jasonfinch", "lonniehodge", "jansimpson", "stickham", "davelawrence", "calideals", "jamesbyers", "jeffherring", "linc4justice", "gspowart", "howardbienstock", "peter_r_casey", "bettydraper", "michaelemlong", "dexin", "the_gman", "bobcallahan", "trendtracker", "tylertorment", "garinkilpatrick", "jim_turner", "ann_sieg", "ken_cosgrove", "frostfire", "pat_lorna", "winetwits", "bradfallon", "timjensen", "photocanvas", "jasonmitchener", "bill_romanos", "mikemayhew", "hawaiirealty", "9miles", "sotero_garcia", "loyalty360", "weirdchina", "markrmatthews", "steveouch", "socrates_soc", "comcastcares", "chrismoreschi", "coffeecupnews", "williecrawford", "louiebaur", "coolsi", "nicolane", "nixthenews", "ezinearticles", "hubpages", "chrisspagnuolo", "fredamooncotch", "sheritingle", "justinglover", "shortawards", "flap", "suggestionbox", "jimdemint", "tweetstats", "thebilly", "thapaparazza", "writinghannah", "0boy", "thinkgeek", "lancescoular", "mayhemstudios", "traderadvice", "dana_willhoit", "jimmysmithtrain", "joeldrapper", "kidscash", "kellyshibari", "stevegarfield", "jasontryfon", "danschawbel", "lookcook", "judyrey", "mjberry", "edwardmoore", "blackbottoms", "dough", "crumcake", "prosperitygal", "lotay", "judyrey", "judyrey", "dougslinks", "wordslingah", "amarsrivastava", "lochnar", "neticule", "mrintech", "skashliwal", "copsucker", "kdelin", "lauralovesart", "nepalsites", "apocketofcoins", "apocketofcoins", "jianart", "yarnmerchandise", "nicoledean", "anonyguy", "aliciabankhofer", "fitdelicious", "heatherinbc", "flomeimberg", "billyjackson", "goodpasture", "browncrownmedia", "murraynewlands", "somethinspecial", "kubalek", "bubbo", "elrobe", "openhippo", "starmars", "rickyrod1385", "hawaiidave", "creepypasta", "dylanfogle", "frankparker", "rickyrod1385", "rickyrod1385", "pilonbignell", "brianwong", "joshsuth", "timandren", "degreeshub", "yogeshgautam", "harrisonpainter", "gannotti", "maheshkukreja", "narayananh", "aceworld", "williamward79", "wmellaart", "whall", "revenuerobot", "susanimate", "mrintech", "jmwilliams", "marcome", "edjamesno1", "dfalco", "jg_nuke", "probateblogger", "seoatlanta", "gamingpcweb", "laffertyjohnson", "yogesh007", "quotes24", "lyceum", "502ms", "safetymatters", "blood_pressure", "gerrigee", "facesinplaces", "youngurban", "timothyblack", "gerrigee", "marcnorris", "jborman", "miklamf", "ericbarbaric", "celebclubber", "iceburner", "smokeydonuts", "nabeel88", "www_azmat_com", "jgillardi", "thehomecounselr", "narayananh", "lauraleeguthrie", "tweetplate", "my10000dollars", "overlandparker", "just_us_j", "carlarose", "nerdizen", "cxxg", "mike_brenner", "brennerbeer", "familyforest", "juic3boxx", "jerlenek", "scottprock", "askanalyst", "s7acker", "mannycortez", "team07", "bmsatierf", "cedricaubry", "ahhphotography", "mr_krypton", "wordslingah", "charcurley", "how2tips", "fortunekookie", "tom_siwik", "fortunekookie", "pramitjnathan", "jamesfk", "cardiffliving", "websiteexpress", "tcotta", "urdomesticbliss", "interney", "matthewmadotcom", "safetymatters", "dansalles", "monalizaamid", "erikg1", "istupidx", "sameer_khan", "sameer_khan", "prichmond14", "paulschwend", "gerrigee", "outcyde", "ireland_oneteam", "cashflowcindy", "cashflowcindy", "successwalls", "jodigirl", "coachingguru", "robinbarr", "traderstudent", "rabieslegacy", "advnery", "2_0", "belfast_news", "cacobart", "sydnesummer", "otalo", "seo_v", "celebclubber", "manup4", "smartcanuck", "chillami"] for friend in friends: try: api.CreateFriendship(friend) except Exception: print "Error %s" % friend
Because code base is so large, it is good idea to make it to a separate script file and run it from terminal. In this case create a new text file, copy and paste above code to it, save the file with name like: create_friends.py and then run script with command: python create_friends.py.
Helper library
You need to realize here, that Twitter has an API call limits. That means that you need to be both careful and clever, if you want to go beyond those limits. But so far, I think you’ll get a good understanding, what you can do if you experience a little bit with programming approach to Twitter. Another useful script is to batch process follower and followed list and unfollow all people, that has not followed you in certain time period. You could do it with a library of python functions / procedures like these:
#!/usr/bin/python251 # file: twitterhelper.py # use example: $ python # >>> import twitterhelper as th # >>> th.unfollow_unfollowers() # requires latest python-twitter dev version!!! # $ svn checkout http://python-twitter.googlecode.com/svn/trunk/ python-twitter import twitter api = twitter.Api(username='your_twitter_username', password='********') # next variables are collected once in runtime. This method is used, because of twitter # API call limits. All specific functions should use these variables if they are populated. # all the users, that are followed followed = None # all the users, that follows followers = None # all the people, that you follow, but who do no follow you unfollowers = None # all the people, that follow you, but you are not following them unfollowed = None # it is good idea to follow people, that follows you until you are a famous person, # which has proper authority def follow_unfollowed(): r = 0 for user in get_all_unfollowed(): screen_name = user.screen_name r = r + 1 try: api.CreateFriendship(screen_name) print "#%s %s" % (r, screen_name) except Exception: print "#%s could not create relationship with: %s" % (r, screen_name) # after some days of following, its good idea to purge your list and keep the # number of followers and followed in a margin of 10% # there is no 100 call limit on unfollow procedure as there is on follow! I did # unfollow 900 people on one shot, maybe there is a limit of 1000... def unfollow_unfollowers(): r = 0 for user in get_all_unfollowers(): screen_name = user.screen_name r = r + 1 try: api.DestroyFriendship(screen_name) print "#%s %s" % (r, screen_name) except Exception: print "#%s could not delete relationship with: %s" % (r, screen_name) # you can get only 100 users / call so get_all_followed and get_all_followers # must make a lot of API calls to get all users # because of hourly API limit of 100 calls, it is possible, that this method does # not work but max 5k followers and followed people def get_all_followed(user = None): global followed if followed != None: return followed users, counter = [], 1 while not len(users) % 100: if user: users += api.GetFriends(user, page=counter) else: users += api.GetFriends(page=counter) counter += 1 followed = users return users def get_all_followers(user = None): global followers if followers != None: return followers users, counter = [], 1 while not len(users) % 100: if user: users += api.GetFollowers(user, page=counter) else: users += api.GetFollowers(page=counter) counter += 1 followers = users return users def get_all_unfollowers(): global unfollowers if unfollowers != None: return unfollowers users = [] followers = get_all_followers() followed = get_all_followed() for f in followed: if f not in followers: users.append(f) unfollowers = users return users # it is good idea to follow all people, that follow you. its all about equality and interaction. def get_all_unfollowed(): global unfollowed if unfollowed != None: return unfollowed users = [] followers = get_all_followers() followed = get_all_followed() for follower in followers: if follower not in followed: users.append(follower) unfollowed = users return users # max 1000 / d def send_direct_message_to_followers(msg): r = 0 for user in get_all_followers(): screen_name = user.screen_name r = r + 1 try: api.PostDirectMessage(screen_name, msg) print "#%s %s" % (r, screen_name) except Exception: print "#%s could not send message to: %s" % (r, screen_name)
To use this script you need the latest dev version of python-twitter because some of the functions uses a page parameter to get all followers from your account. Get details from python-twitter Google code project. Then create a new file, lets call it twitterhelper.py and follow next steps to unfollow all unfollowers:
$ python >>> import twitterhelper as th >>> th.unfollow_unfollowers()
If you have a large follower base, it can take minute or two to finnish the script.
Remember to run Python and scripts from the same directory that you have saved the scripts. Also remember, that Python uses indented code, so all whitespace needs to be on file as it is presented here. Read Python manual carefully, if you are new to Python programming.
Happy coding
I hope this helps to get started with Python to Twitter interaction. Just be sure you follow the rules and limits of Twitter and also with netiquette, because there is no benefit of getting angry or frustrated people if you mess up with tools like these.
I also want to say that because of quite general nature of these instruction, you may counter some extra work and steps, that has to be done to get everything working from Python installation to running given scripts, but don’t give up. You can do it, not because I have done it, but because it IS doable
.





