Sunday, 17 August 2014

Data From Web Scraping Using Node.JS Request Is Different From Data Shown In The Browser

Right now, I am doing some simple web scraping, for example get the current train arrival/departure information for one railway station. Here is the example link, http://www.thetrainline.com/Live/arrivals/chester, from this link you can visit the current arrival trains in the chester station.

I am using the node.js request module to do some simple web scraping,

app.get('/railway/arrival', function (req, res, next) {
    console.log("/railway/arrival/  "+req.query["city"]);
    var city = req.query["city"];
    if(typeof city == undefined || city == undefined) { console.log("if it undefined"); city ="liverpool-james-street";}
    getRailwayArrival(city,
       function(err,data){
           res.send(data);
        }
       );
});

function getRailwayArrival(station,callback){
   request({
    uri: "http://www.thetrainline.com/Live/arrivals/"+station,
   }, function(error, response, body) {
      var $ = cheerio.load(body);

      var a = new Array();
      $(".results-contents li a").each(function() {
        var link = $(this);
        //var href = link.attr("href");
        var due = $(this).find('.due').text().replace(/(\r\n|\n|\r|\t)/gm,"");   
        var destination = $(this).find('.destination').text().replace(/(\r\n|\n|\r|\t)/gm,"");
        var on_time = $(this).find('.on-time-yes .on-time').text().replace(/(\r\n|\n|\r|\t)/gm,"");
        if(on_time == undefined)  var on_time_no = $(this).find('.on-time-no').text().replace(/(\r\n|\n|\r|\t)/gm,"");
        var platform = $(this).find('.platform').text().replace(/(\r\n|\n|\r|\t)/gm,"");

        var obj = new Object();
        obj.due = due;obj.destination = destination; obj.on_time = on_time; obj.platform = platform;
        a.push(obj);
console.log("arrival  ".green+due+"  "+destination+"  "+on_time+"  "+platform+"  "+on_time_no);      
    });
    console.log("get station data  "+a.length +"   "+ $(".updated-time").text());
    callback(null,a);

  });
}

The code works by giving me a list of data, however these data are different from the data seen in the browser, though the data come from the same url. I don't know why it is like that. is it because that their server can distinguish the requests sent from server and browser, that if the request is from server, so they sent me the wrong data. How can I overcome this problem ?

thanks in advance.

2 Answers

They must have stored session per click event. Means if u visit that page first time, it will store session and validate that session for next action you perform. Say, u select some value from drop down list. for that click again new value of session is generated that will load data for ur selected combobox value. then u click on show list then that previous session value is validated and you get accurate data.

Now see, if you not catch that session value programatically and not pass as parameter with that request, you will get default loaded data or not get any thing. So, its chalenging for you to chatch that data.Use firebug for help.

Another issue here could be that the generated content occurs through JavaScript run on your machine. jsdom is a module which will provide such content but is not as lightweight.

Cheerio does not execute these scripts and as a result content may not be visible (as you're experiencing). This is an article I read a while back and caused me to have the same discovery, just open the article and search for "jsdom is more powerful" for a quick answer:

Source:http://stackoverflow.com/questions/15785360/data-from-web-scraping-using-node-js-request-is-different-from-data-shown-in-the?rq=1

Wednesday, 13 August 2014

Business Intelligence Data Mining

Data mining can be technically defined as the automated extraction of hidden information from large databases for predictive analysis. In other words, it is the retrieval of useful information from large masses of data, which is also presented in an analyzed form for specific decision-making.

Data mining requires the use of mathematical algorithms and statistical techniques integrated with software tools. The final product is an easy-to-use software package that can be used even by non-mathematicians to effectively analyze the data they have. Data Mining is used in several applications like market research, consumer behavior, direct marketing, bioinformatics, genetics, text analysis, fraud detection, web site personalization, e-commerce, healthcare, customer relationship management, financial services and telecommunications.

Business intelligence data mining is used in market research, industry research, and for competitor analysis. It has applications in major industries like direct marketing, e-commerce, customer relationship management, healthcare, the oil and gas industry, scientific tests, genetics, telecommunications, financial services and utilities. BI uses various technologies like data mining, scorecarding, data warehouses, text mining, decision support systems, executive information systems, management information systems and geographic information systems for analyzing useful information for business decision making.

Business intelligence is a broader arena of decision-making that uses data mining as one of the tools. In fact, the use of data mining in BI makes the data more relevant in application. There are several kinds of data mining: text mining, web mining, social networks data mining, relational databases, pictorial data mining, audio data mining and video data mining, that are all used in business intelligence applications.

Some data mining tools used in BI are: decision trees, information gain, probability, probability density functions, Gaussians, maximum likelihood estimation, Gaussian Baves classification, cross-validation, neural networks, instance-based learning /case-based/ memory-based/non-parametric, regression algorithms, Bayesian networks, Gaussian mixture models, K-means and hierarchical clustering, Markov models and so on.

Source:http://ezinearticles.com/?Business-Intelligence-Data-Mining&id=196648

Monday, 30 June 2014

Why I Use an Anonymous Web Proxy Service

I've been using an anonymous web proxy service for some time now and I don't think I would ever go back to ordinary surfing.    It's not that I am some sort of shadowy cyber criminal with some secret online life, no I pretty much surf the same web sites as everyone else, I certainly don't go to illegal or criminal sites.

If you want to know why, it's simply because I value my privacy and I know what data is stored in the average organisation and how it is protected.   Take your ISP for example, they logs pretty much everything that passes through them - every single request, every web page, every email and even every image is logged.   The vast majority of this traffic is in cleartext so the majority of it is instantly readable and can be matched to your address. 

It's amazing what these logs can tell about people you can build up a lot of information about someone from what they do on the web.  So do you know who has access to these logs at your ISP, what controls are in place, how is this information stored ?

If you don't know your not alone but after 25 years working in IT, I'll pretty much bet you wouldn't like to know the answer anyway.  This is the problem with much internet communication, it's so completely open - occasionally you'll obviously use a secure site to type in your credit card details.   Yet up to the point all your information is flying across the internet ether completely unprotected and accessible to anyone who has the will and the knowledge to intercept it. 

Believe me there are plenty of people who do have an interest in your information

Why do you think a European Directive was recently passed - Directive on Mandatory Retention of Communications Traffic Data.   It's  a bit of a mouthful but what it's  actually doing  is forcing your ISP to keep a record of every email sent, every internet session and web site visited for two years.   So think back at every web site you've ever visited for the last two years and it's on record and can be matched to your own little electronic profile.

How does that make you feel?

Even if you've done nothing wrong it's bound to make you feel a little uneasy after all why do Governments want all this information about us?   If you want to feel a little more uneasy, many Governments are looking at the UK Governments idea who are going to store all this information in a central database accessible to certain organisations.     Fear not US citizens you'll not be left out - the FBI are pushing hard for similar data retention facilities.

Storing data is dangerous

If you store data you have to be prepared to take good care of it.   All the privacy erosion concerns aside, the more personal data is stored about us, the more people will have access to it.  How thorough do you think is the vetting procedure for an ISP Technical engineer ?  Who potentially has access to huge amounts of this data.    Even if implicitly trust our govenrments with this tremendous invasion of our privacy - fraudsters, identity thieves and others can create mayhem with this sort of information. 

These logs are gold dust to anyone trying to steal our identity for example - they can match up users, with web sites, pick up password and all sorts of personal information.  Even  though a small part of this information is encrypted when you're actually using a secure web site (with the padlock below) there's plenty of other personal information available to compromise your usernames, password etc.

An identity thief can pick up huge amounts of data about the average person all ready, an hour or two picking up all your web traffic and they'll also have where you bank, what web sites you visit and logon to and a whole heap more.  This unfortunately is the tip of the iceberg and I suspect you'll see many, many people protecting  their privacy online soon from identity thieves, hackers and even our friendly snooping governments.

Everything I do online is private, I use a fast professional service that anonymises my connection and encrypts all the data.  My web logs sit next to yours in a server room at my ISP however mine are all completely encrypted and unreadable by anyone, whereas yours are in clear text.

One thing I should warn people about is the use of free anonymous web proxy services which you see all over the web.   Be very, very careful about these and think why are they supplying a very expensive and resource hungry service for free?   Remember also that by using one of these free proxies you are redirecting your traffic via this server whose owner can capture and log your data himself.   Many of these are owned and run by Eastern European Hacking groups as an easy way to gain peoples traffic, so be careful.

Source:http://ezinearticles.com/?Why-I-Use-an-Anonymous-Web-Proxy-Service&id=1679289

Sunday, 15 June 2014

What to Look for When Hiring WordPress Developers?

The toughest part about hiring WordPress developers is that you don't really have an idea about what you don't know! Quite evidently it sounds like stating the obvious. Some of these "how to do" tips are really practical and will be easy to follow.

So this is what to look for when hiring WordPress developers:

Portfolio:

OK - this again may seem supremely obvious - but I have seen a lot of people offering WordPress customizations or design services (especially as WordPress grows, there are plenty of people jumping into this arena) - however, they don't have any sample work with them.

What's the Process?

a. Are you going to communicate over the phone?
b. How frequently are you going to do that?
c. What is the time period?
d. Will you receive updates?
e. Which kind of communication processes can you expect?

Design/Graphics:

When your graphics are finally done and your site looks fantastic - who ultimately owns the right to the final work? Do you have the right to use the artwork/graphics however and wherever you want to?

If you have paid for custom graphics, you have to make sure that you have the luxury and liberty to use them as and when you want them to! However, on the other hand, if you are using stock pictures, then you have to strictly follow the copyright guidelines enlisted on the site from where you have purchased the work.

Skills:

Yes, this is indeed another point that seems pretty obvious, isn't it? I had a few clients who recently hired individuals to make WordPress customizations, however surprisingly enough; they were not really acquainted with WordPress.

There are situations where the clients hired individuals who were graphic designers. They worked mainly with Dreamweaver; numerous client pages were made in Dreamweaver, and then pasted on to the WP editor. In such instances, if the client attempted to adjust things without understanding the HTML, they ran the huge risk of throwing the entire page off.

If you bring in somebody to help create a custom WordPress theme or create a WordPress customization, ascertain the fact that they really understand the features of WordPress! If you can't use the things that make WordPress what it's intended for - it is defeating enough and it seems like a vain uphill journey.

Functionality:

This relates straight to training. If additional features /options are uploaded on your website (as for example: shopping cart, video & audio plugins etc.), are you aware as to how to use them productively?

What exactly is included with set up? Let's take a shopping cart for example:

- Is the autoresponder integrated properly? (If at all possible)
- Are your products being effectively added?
- Is the Thanks page for purchases being set up?
- Are Product images (cropping/ editing, etc.) included?
- Is the Payment gateway installation included?

Many of these functionalities demand additional effort and time. Strive hard to understand in a crystal-clear manner what is being included for any such additional features.

Support:

When your website is done completely and your contract also is complete, is there any support available?

a. Enquire whether the support is handled through help desk, email, or a phone call?
b. Enquire about the charges for support?
c. Can there be an option for monthly maintenance/ support?
d. In case your designer does not offer support, are they able to refer someone else?

So, these are some of the important criteria, I would suggest that you consider when hiring anyone to create a WordPress website for you. Hope this can help!

Source:http://ezinearticles.com/?What-to-Look-for-When-Hiring-WordPress-Developers?&id=8047568

Tuesday, 10 June 2014

Internet marking is the finest method of increment of popularity in commerce

In today’s world key to any business is right kind of marketing strategy that needs to be implemented for the success of any entrepreneurial project. One of the fastest growing ways is to get the listing of your company in top search engines. SEO is one of the ways which can help in increasing or diverting the traffic on any website. People should understand the search result of their website is displayed on the World Wide Web. Different search engines work in different ways by providing different ranking to websites according to the search of the people.

This is why same website has different ranks on different search engines. Basically, website owner provides the keywords to the SEO providers which are appropriate to their business. Business SEO providers make sure the owners are charged low and also providing correct information to search engines. Providing better SEO in Ottawa is the basic feature that service providers aim at, their main motive is to make these services available to all the common people so that they can benefit there business in a better way. A good SEO mostly uses popular sites like Google, Bing, Yahoo, Yellow pages etc.

These SEO companies make sure that the listing of their clients is upgraded by repeated updating and also there ranking reaches top on search engines. Consultations with SEO service provider can be availed for free by the website owners. SEO companies carefully chooses keyword for their clients because it has to be unique and commonly used to make them reach at the top .They do so by carefully analyzing the owners website and competitors website and then the strategy is made to determine the perfect keyword for their clients.

Owner should make sure that the prices charged to him are competitive according to market. Consultation and Analysis are important because the keyword formation is directly dependent on these two parameters if the SEO service provider fails to submit the proper keyword it would result in failure of whole SEO services for the owner.

SEO provider can re create and also modify the keywords for any website. If anyone specifically looking to create a new SEO website for him then the Looking internet marketing company in ottawa specialists can help them in determining a new domain that could be related to the business of the owner. Secondly, good hosting service is provided by them which help a website fast to access by any user. The biggest task for Internet marketing specialist is Link building because it represents more than 80% result of SEO. For any website owner good SEO link building can be good in this competitive world because it attracts the people.

A good SEO developer plays a pivotal role in developing a perfect keyword for the company. Ottawa SEO companies are very famous to deliver their services to the customers at very reasonable prices. SEO services are available online one can visit their websites see the list of services offered by them, read the testimonials of the existing and choose from them pay online and get started.

For further detail about Business seo service in Ottawa please visit the website.

Source:http://blogs.siliconindia.com/businessseo/Business/Internet-marking-is-the-finest-method-of-increment-of-popularity-in-commerce-bid-cf9206bx84461691.html

Tuesday, 20 May 2014

Really are the Education Industries do marketing activities as like eCommerce Portal?

“If you have command over English, you can command anyone”. This is the proverb used to say someone is expert in particular subject or particular business so that he has command over power compare to other team members. The Education System also started like that someone might be in the teaching profession couple of decade of years and he would have awarded by many of the Non-profitable organizations and Educational Body’s as “Best of the teacher”, “Award-winning headteacher”, “Teacher of the year”, etc…

The person mind & soul is full of upliftment of education for the nation. Being the education upliftment for nation as ambition he may start the school in very small way that too even without infrastructure because he is not the Businessman or not funded by Venture Capital (VC). But by the word of mouth, he would be getting overwhelming admissions for his schools though he doesn’t have any school infrastructure, process, standards, etc… Nowadays, we have 1000s of schools in the market but we can count it those kinds of schools being very few schools that too it may be single digit.

We would like to take this opportunity to introduce one pre-school in Bangalore which has started in very small in last year that too less than 30 students (Without any marketing activity or marketing strategy). More than the education, they are doing as profession. You can’t imagine the kind of care or Toiling and moiling effort to improve the kids wisdom in all the aspects. You would be wondering even the 15 months old kid what they noticed and given the annual report. It’s amazing! Marvelous. Please find the sample report here. (Download). It’s our wishes to success in their academic excellence.

Important Note: Pramiti is one of the only schools along with Inventure Academy in Karnataka that is part of the India Inclusion Forum launched on 26th of January 2014 on the occasion of Republic Day.

Today the schools are opened by the business people as another business entity part of their business. It becomes chain of schools. It’s another way of revenue generating model. Recently we observed one chain of school opened nearing to our area BTM, Bangalore which has done 1….N Marketing Activity (we can say there is no more marketing activity) to fulfill the admissions. Even the corporate generate Crores of business everyday they might not be done such a Huge Advertisement. It’s called as Killer Strategy. Usually, the Killer Strategy would be implemented ONLY product based company to compete other product or services. But Schools are doing it’s unvitable. Because end of the day all this marketing expenses going to bear by parents.

It’s NOT only the schools are doing these marketing activities. Even most of the colleges, universities, B-Schools are doing these marketing activities. One of their key marketing activities or strategies is Bulk SMS Promotional Activities with the key Targeted Audience. i.e.)  ABC Company is offering B-School(MBA Course) as part time course, they go to Job Portal and target all the fresh graduates and download their contacts and keep sending them SMS Communication about the advantages of B-School, features, etc… and convert them to become the B-School enrollment.

Conclusion: It’s quiet common nowadays each educational institutions targeting their student base and keep sending the SMS Communication to convert them into admissions. It becomes one of the basic marketing activities for Educational Institutions.

Source:http://blogs.siliconindia.com/bulksmscompany/Business/Really-are-the-Education-Industries-do-marketing-activities-as-like-eCommerce-Portal-bid-fP9gkbI221215141.html

Monday, 19 May 2014

Bitcoin Mining Company CoinTerra Enters Cloud Mining

Amid rapid changes in the bitcoin mining industry, another bitcoin miner is going into the cloud.

CoinTerra on Monday announced that it will begin offering cloud-based mining services to its customers, becoming the second big miner this month to make the move. As the price of bitcoin has tumbled, it has become increasingly difficult to profitably mine bitcoin, a problem for the miners and the companies catering to them.

As more miners come aboard, the bitcoin algorithm automatically adjusts its difficultly higher. This has sparked an arms race, with miners deploying increasingly powerful computers to stay on top. That has led to a rising spiral of costs. It’s reached the point where it’s become cost-prohibitive for people to mine on their own. Cloud mining, where miners buy contracts from companies like CoinTerra and PeerNova, is emerging as a cheaper option.

CoinTerra, founded nearly a year ago,  will be selling one- and two-year contracts for a range of mining power, from 200 gigahash (small) up to one petahash (big), as well as continuing to sell mining rigs. “We’re catering to basically the entire spectrum out there,” CEO Ravi Iyengar told BitBeat. Through the mining rigs it sells, CoinTerra comprises about 15% of the total mining output, the company said, and it expects to maintain that market share.

As bitcoin has grown, the”hash rate,” a measurement of mining power, has skyrocketed. In September 2013, the entire mining network reached the 1 petahash/second rate, a multiple of 40 times higher than in January 2013. Now CoinTerra will be selling 1 petahash contracts. It’s gotten so big, it’s harder to mine profitably on anything but a very large scale. CoinTerra itself saw sales drop 30% in April. Thus the move into cloud mining.

In the early days of the cryptocurrency, it was possible to mine using desktop computers. As it grew, CPUs gave way to graphics cards, which gave way to generic chips modified for mining, which gave way to chips programmed for a single task called ASICs. It now takes machines with multiple dedicated chips to mine profitably, and increasingly even that kind of computing power doesn’t provide a sufficient return on the investment, given the falling price of bitcoins, the increasing size of the mining community, and the concurrent increasing energy demands, which has emerged as a major roadblock. “Space and power is a big issue,” Mr. Iyengar told BitBeat. “The power required is unlike any other server industry.”

CoinTerra is leasing space at several data centers in the U.S., he said, and has some plans to build its own data center.

The upheaval has resulted in a string of problems for the industry, from bankruptcies to delivery delays to lawsuits. KnCMiner has had problems with deliveries, and branched out into selling rigs that mine for altcoins rather than bitcoin. Butterfly Labs is involved in several lawsuits, and a startup called HashFast Technologies (which is also involved in a lawsuit) on Monday announced that it laid off 50% of its staff. Washington-based Alydian simply went bankrupt as the cloud-based mining business it built couldn’t keep up with the increasing power demands.

“A lot of people got into this space in the mad gold rush,” Mr. Iyengar said, “here you’re trying to combine hardware and software and the whole supply chain associated with a server market.” He likened it to trying to combine Intel, Microsoft, and Dell.

The total computing power is rising at such an exponential rate, that machines have a short productive lifespan. Even a delay of a month or two between the time a customer places an order and the time the machine arrives can severely cut into profits.

Thus the move into the cloud. CoinTerra joins the recently formed PeerNova in offering cloud services.

Source:http://blogs.wsj.com/moneybeat/2014/05/12/bitcoin-mining-company-cointerra-enters-cloud-mining/