Cool Social Media Sharing Touch Me Widget by Blogger Widgets



Wednesday, 11 December 2013

How to generate Internet traffic with Selenium - part 3

The Selenium website has available downloads and documentation that should help beginners with the software. As a .NET developer, I am used to using Visual Studio and C# to use Selenium. But for those that do not have a Visual Studio license, it may be easier to use Selenium with Java. There are some great, free IDEs for Java such as Netbeans and Eclipse. Stackoverflow is also a great site for programming questions and answers.

I will be writing all my code examples in C#, but it is very similar to Java, and should be easy enough to translate from language to the other with some basic programming knowledge, it will mostly just be a case of knowing the difference between the Selenium APIs for the different languages.

So, in a nutshell, I open a Firefox browser with Selenium, go to Hide My Ass (ensuring that I visit my blog post via different IPs), go to my blog post via Hide My Ass, close my browser, and repeat. In all fairness, you could just hit F5 repeatedly to increase your pageviews. But at least this way the process is automated, and the page views will come from a range of different IP addresses.

As explained in an earlier post, this will not be a programming tutorial, more of an experiment into generating web traffic by using Selenium, but I will include a code example to give you an idea how I am using Selenium.

Simple code example (comments are preceded by //):

FirefoxDriver firefoxDriver = new FirefoxDriver(); // initialize web driver
firefoxDriver.Navigate().GoToUrl("http://hidemyass.com/"); // go to hide my ass
WebDriverWait wait = new WebDriverWait(driver.Value, TimeSpan.FromSeconds(10));
// initialize object that will wait for page elements, so we can wait until HMA is loaded before clicking
wait.Until((d) => d.FindElement(By.Id("hmabutton")).Displayed); // wait for button on HMA page
firefoxDriver.FindElement(By.Id("hmaurl")).SendKeys("http://handynettips.blogspot.co.uk/2013/12/how-to-watch-films-on-movie2k-when-it.html"); // enter the target blog url into the HMA search box
firefoxDriver.FindElement(By.Id("hmabutton")).Click(); // click the HMA button and go to the blog page
// wait for an element on the blog page (as with above wait code)
firefoxDriver.Quit(); // close the browser

Stick all of the above in a loop and the process can be repeated as many times as you like. With Selenium it would be possible to run several different browsers (Chrome, IE, Firefox, Opera, Safari, Android) at the same time, and several instances of each browser. In theory, you could generate thousands of views per day.

One downside of Selenium is, if you are running it on the computer that you would usually use, browser windows constantly opening and closing would distract you from your work. If you have a spare machine it would probably be more convenient to use on that. Also, Selenium Grid allows you to run browsers on a remote machine, this is a little more complicated but in my experience, more reliable than using the custom Firefox/Chrome drivers, etc.

As stated previously, this is a work in progress, and I am unsure how successful this experiment will be, if at all. In all likelihood I will get banned once Blogger figure out that I am generating web traffic with Selenium, please do not go and point Selenium at your website or blog if you are serious about your page views, or at least look further into it than I have, this is just for fun.

So far, I have Selenium constantly revisiting one of my blog posts in order to increase its web traffic. This is fairly basic, but imagine the other possibilities with automated web browsing - I could Tweet links to my blog on an automatic timer, automatically build an online presence - for each post on my blog, post to Youtube, Reddit, StumbleUpon, Facebook likes, etc.

Of course, taking this too far would be seen as spamming and result in accounts being banned. Ever wonder what those annoying captchas are for? For preventing automated processes from being able to create thousand of fake accounts, for example. But I'm convinced that some of the big boys in SEO use similar, if far more advanced and sophisticated techniques to boost their web rankings.

In the next post, I will look at the possibility of using Selenium to build a social networking presence.

How to generate Internet traffic with Selenium - part 2

Since the last blog post on generating traffic with  Selenium, I have been running Selenium and generating page hits for my Movie2k blog post. Using a similar trick as in the Movie2k post, visiting my blog post on using a proxy, via a proxy (Blogception), I am hoping that generating the traffic from random IPs will somehow make my analytics more authentic and propel me up the page rankings.

My blog traffic stats so far

As you can see, I've had over 500 visitors today already! As far as I can tell, nearly all the visits I have had so far have come from my Selenium browser, although some other referring sources have appeared - Google, vampirestats and 7secretsearch.

DO NOT VISIT SITES LIKE VAMPIRESTATS AND 7SECRETSEARCH, it turns out they are malware sites. Thanks to Spam Spoiler and their blog post  I avoided actually visiting these sites myself. For full info, read their post. But it appears that these sites fake a referral to your blog, in order for you to then visit their website and boost their web traffic (as well as hit you with malware).

Sounds kind of like what I'm trying to do, at least in the sense of generating web traffic. Only I am not using malware and I am just interested in learning and sharing methods of boosting web traffic. And even though I seem to be getting the wrong kind of traffic so far, I'm on the map at least!

In total, I have just under 2000 blog views so far, 99% of which would have been generated by my Selenium
code. I have not much luck so far in terms of genuine web traffic, but I think I may be able to boost this further with social media and Selenium.

But before I go any further, I will discuss more details of the Selenium code that I am using so far in the next blog post.

Tuesday, 10 December 2013

How to generate Internet traffic with Selenium

I am interested in the possibility of boosting web traffic using Selenium. I wrote recently about instructions on how to access Movie2k when it is blocked by your ISP. New to blogging, I thought that this handy net tip would attract loads of views and my Internet stardom would be born. But to my dismay, around a week later I have had virtually no page views. I even went to the trouble of posting links to my blog on a few social media sites (I will write a post on using social media to boost traffic in a future post) but still barely got any views.

Its hard for budding bloggers to make their way on the Internet when it is so difficult for your blog to be found in the first place. I am sure you have all read 'x ways to boost your blog SEO' or similar, but as far as I can tell, it isn't that easy. Adding a few keywords doesn't seem to have had any affect for me so far. I am aware of the basics, like writing loads of blog content, commenting on other people's blogs, building an online presence, etc. In truth though, I'm lazy. I want to do this the easy way, if there is one. And I'm not entirely sure that the 'x ways to boost your blog SEO' is even going to do the trick in an ever increasingly saturated blogosphere. I'm hoping that Selenium might be able to help me here.

For those of you that don't know, Selenium is a wonderful tool that can be used to automate web browsing. In the past I have used Selenium to test websites that I have developed for bugs on the front end of my websites. This blog post is a little tricky, as you will require some knowledge in programming and HTML to be able to use Selenium. I will include some code examples, in the hope that anyone may find it useful. But this isn't a programming/HTML tutorial as such, but an experiment into boosting web traffic with automated browsers. I cannot be bothered surfing about for references, so a lot of this is going to be off the top of my head, there's plenty of programming/HTML/Selenium tutorials out there.

This blog is also tricky in that I am entering unknown territory. I haven't done this before and am not entirely sure whether this will work or not. I could go off and experiment and then my post my result later, but where's the fun in that?! .... [more to follow]

Wednesday, 4 December 2013

How to watch films on Movie2k when it is blocked

I found a neat and simple way to be able to access Movie2k, even though it is blocked by my ISP in the UK. The way I see it, why am I going to pay for films when companies like Amazon (who own Lovefilm) don't even pay their taxes?

Movie2k doesn't actually store any films, it just contains links to hosting sites where you view the films. Nonetheless, Movie2k is very useful for finding the films in the first place, and I also love how they rate the quality of the hosted film using smileys. Using a proxy site, it is possible to access Movie2k, and then to retrieve the URL for the hosted film, which you can then just slap into your browser, and enjoy. I'll give instructions and screenshots below.

A proxy site is basically a remote server that you can use to browse the web, at least that's my understanding in a nutshell. So in theory, if your ISP has blocked a site, then you could still visit the site via a proxy which may be able to access the site. Personally, I use Hide My Ass but there are plenty of others that can be easily searched. Start by going to Hide My Ass, and just go straight to Google.com by clicking the Hide My Ass button.
(Note: you could put the Movie2k address straight in here but I'm too lazy to go and find the URL).


Once you're onto Google, do a search for Movie2k and click the link. Success! You're onto Movie2k!


As you can see, the page has loaded. The CSS (layout) is a little screwed up for some reason but we have enough to work with. Ok, nearly there. I have found that I am unable to watch the movie through Hide My Ass for whatever reason, but we can at least get to the page that hosts the movie, and from that we can retrieve the URL for the page and watch the movie direct without any proxy. Select the film you wish to view, as you would normally do when browsing Movie2k:


And then you are able to get the URL for the hosted movie (see highlighted URL in blue). Copy this URL into your browser, without using the proxy, and you're good to go!


Tip: In case you have noticed, the screwed CSS on the left hand side prevents you from accessing the search box on Movie2k. In order to work around this, simply click one of the links at the top of the Movie2k page, like FAQ or register, and you should land on a page that allows you to access the search box without any problems. Happy viewing :)


There's also a video tutorial here: