Monday, 16 December 2013

Web Scraping a JavaScript Heavy Website: Keeping Things Simple

One of the most common difficulties with web scraping is pulling information from sites that do a lot of rendering on the client side. When faced with scraping a site like this, many programmers reach for very heavy-handed solutions like headless browsers or frameworks like Selenium. Fortunately, there's usually a much simpler way to get the information you need.

But before we dive into that, let's first take a step back and talk about how browsers work so we know where we're headed. When you navigate to a site that does a lot of rendering in the browser -- like Twitter or Forecast.io -- what really happens?

First, your browser makes a single request for an HTML document. That document contains enough information to bootstrap the loading of the rest of the page. It loads some basic markup, potentially some inline CSS and Javascript, and probably a few <script> and <link> elements that point to other resources that the browser must then download in order to finish rendering the page.

Before the days of heavy JavaScript usage, the original HTML document contained all the content on the page. Any external calls to load CSS of Javascript were merely to enhance the presentation or behavior of the page, not change the actual content.

But on sites that rely on the client to do most of the page rendering, the original HTML document is essentially a blank slate, waiting to be filled in asynchronously. In the words of Jamie Edberg -- first paid employee at Reddit and currently a Reliability Architect at Netflix -- when the page first loads, you often "get a rectangle with a lot of divs, and API calls are made to fill out all the divs."

To see exactly what this "rectangle with a lot of divs" looks like, try navigating to sites like Twitter or Forecast.io with Javascript turned off in your browser. This will prevent any client-side rendering from happening and allow you to see what the original page looks like before content is added asynchronously.

Once you've seen the content that comes with the original HTML document, you'll start to realize how much of the content is actually being pulled in asynchronously. But rather than wait for the page to load... and then for some Javascript to load... and then for some data to come back from the asynchronous Javascript requests, why not just skip to the final step?

If you examine the network traffic in your browser as the page is loading, you should be able to see what endpoints the page is hitting to load the data. Flip over to the XHR filter inside the "Network" tab in the Chrome web inspector. These are essentially undocumented API endpoints that the web page is using to pull data. You can use them too!

The endpoints are probably returning JSON-encoded information so that the client-side rendering code can parse it an add it to the DOM. This means it's usually straightforward to call those endpoints directly from your application and parse the response. Now you have the data you need without having to execute Javascript or wait for the page to render or any of that nonsense. Just go right to the source of the data!

Let's take a look at how we might do this on Twitter's homepage. When a logged-in user navigates to twitter.com, Tweets are added to a user's timeline with calls to this endpoint. Pull that up in your browser and you'll see a JSON object that contains a big blob of HTML that's injected into the page. Make a call to this endpoint and then parse your info from the response, rather than waiting for the entire page to load.

It's a similar situation when we look at Forecast.io. The HTML document that's returned from the server provides the skeleton for the page, but all of the forecast information is loaded asynchronously. If you pull up your web inspector, refresh the page and then look for the XHR requests in the "Network" tab, you'll see a call to this endpoint that pulls in all the forecast data for your location.

scraping-forecast-io

Now you don't need to load the entire page and wait for the DOM to be ready in order to scrape the information you're looking for. You can go directly to the source to make your application much faster and save yourself a bunch of hassle.

Wanna learn more? I've written a book on web scraping that tons of people have already downloaded. Check it out!

Source: http://tubes.io/blog/2013/08/28/web-scraping-javascript-heavy-website-keeping-things-simple/

Street scraping begins tonight

Finally, city plows will attack residental neighbourhoods tonight to hack down the road ruts that have jolted drivers, damaged the suspension of vehicles and caused accidents.

Only one question: What took them so long?

Last week's dump of snow caused the city to deploy more than 300 pieces of equipment to clear the main streets and collector routes -- even back alleys and sidewalks.

The city had mulled since last Thursday whether to order the plow. But it wasn't decided until Monday afternoon to begin plowing the hundreds of kilometres of residential streets starting today at 7 p.m.

CAA Manitoba wanted faster action. The organization representing drivers believes the hard-and-high ruts made it dangerous to drive city streets.

That is, calling on the city to plow residential streets when ruts -- like the ones left from last week's blizzard -- cause dangerous driving conditions.

"When the roads are in an unsafe condition, then money can't be the first factor," CAA spokeswoman Liz Peters said on Monday.

"Safety has to be the main factor. We think it is time to plow."

Peters said they have reports from its members the ruts are currently so deep, cars can't get out of them to change lanes.

As well, Peters said because there is ice at the bottom of the ruts, vehicles are sliding into other vehicles.

She said one motorist told CAA when they tried to drive out of the ruts they lost control and began spinning.

Forecast snow delayed plow: public works

North Kildonan's Jeff Browaty, a member of Mayor Sam Katz's powerful executive policy committee (EPC), said he doesn't understand why it took so long to clear residential streets.

"I'm surprised and frankly a bit disappointed it took them this long to initiate a full residential plowing operation," Browaty said. "In my own experiences, I've found navigating residential streets in North Kildonan, even at very slow speeds, to be challenging due to the ruts and slick nature of the compacted snow."

Tonight's full residential street plowing brings an accompanying ban on residential street parking.

Coun. Russ Wyatt said council delegated the decision on when to plow to the public works director, Brad Sacher.

Sacher said the city could have tackled residential streets last week but held off until now because more snow was in the forecast.

"We didn't want to start a plow if more snowfall was coming," Sacher said, adding the city believed most streets were passable and the decision was to use the weekend to assess the situation.

With nothing but sunny skies in the forecast, Sacher said residential streets will now be done.

'We must all slow down': Wyatt

Wyatt, finance chairman and also a member of EPC, said he found residential streets were rutted but driveable.

"We must all slow down a bit when driving," Wyatt (Transcona) said. "We live in Winnipeg -- not Waco, Texas.

"Most any other city hit with last Thursday's storm would have been shut down for a week."

A survey of city councillors found driving conditions varied across the city.

Brian Mayes (St. Vital) said parts of his ward were clear but he did receive complaints from residents living near St. George School and River Pointe.

John Orlikow (River Heights-Fort Garry) said he believed driving conditions were "dangerous" in parts of his ward.

Grant Nordman (St. Charles), another member of EPC, said motorists need to relax.

"Was driving good? No; Was it passable? Yes," Nordman said. "It's Winnipeg, it's winter -- leave earlier, take your time, relax."

Wyatt said the residential plow will exhaust city's 2013 snow clearing budget, adding he's concerned another snow storm this month will push the city into a deficit for this year.

"I think we should have waited," Wyatt said.

"The streets were passable."

What’s the worst road you’ve driven on since last week’s storm?

Join the conversation in the comments below.

WORD ON THE STREET

MECHANICS: Vehicles don't like it rough

If you feel jarred by ruts that have carved up Winnipeg streets, your vehicle feels your pain.

The ruts cause problems in the front end of a vehicle, specifically in the alignment, steering components and suspension, Rudy Epp owner of Rudy's Auto Service said.

If tire pressure is low, the ruts can damage rims and tires above and beyond what may happen to the suspension, said Myron Naumik, body shop manager of Macdonald Auto Body.

"Just turn up the radio and take it slow, and make sure you have the proper tire pressure."

POLICE: A question of traction

Winnipeg does not put snow tires on police cruisers. "It's something we would like to see, but ultimately it's the service's responsibility. Our members are well-trained drivers," said George Van Mackelbergh, vice-president of the Winnipeg Police Association.

"The city is talking about cutbacks to the police budget. If they cut back services they won't be paying money for snow tires.

"But it's a difficult time to respond to calls because the other drivers are getting reacquainted with the dangerous conditions."

FIREFIGHTERS: Heavy trucks don't need snow tires

The large trucks firefighters drive probably don't need snow tires, said Alex Forrest, president of the United Firefighters of Winnipeg.

Forrest said firefighters respond to 93,000 fire and paramedic calls per year and many of those are in winter driving conditions.

"It's part of being a firefighter here. We're a winter city and we go in the worst conditions."

Source:http://www.winnipegfreepress.com/local/street-scraping-begins-tonight-235188231.html

Friday, 24 May 2013

Beneficial EBay Product Scraping

It is very beneficial for you and your creativity and hard work of every dollar that was earned by work. Most companies created money and knowledge necessary to make it a success will require a large number of vices. She can run in a few months.

With the right guidance, anyone can, regardless of age, educational qualifications or other damage alleged in - well, it can be intimidating at first (as I could learn anything new), however, is relatively easy to fix things and soon going to make money on eBay

Link your ad to all eBay items and drive traffic to your listing works - all you need to do is provide good quality products, well enumerate, very good customer service.

Here are the simple steps you need to take to get started is a summary: -

Immediately you have to register with PayPal to accept secure card payments.

Source products. For starters, this may be the old unwanted items, but make sure they are of good quality. You are selling that when you're trying to be a reputable seller who do not want to have a reputation.

With a digital camera or camera phone to take a photo of your item. He said: "A picture is worth a thousand words", so make sure it's a good quality image, as the old saying goes, you can.

Items similar research on eBay to see what they sell and how their competitors in the market to get an idea of your articles.

List your items on eBay photographs, a detailed, honest and create in their terms and conditions, and then submit it.

Be sure to regularly check the progress of the auction and in a courteous and timely response to any questions.

Positive feedback for our customers, and if they are happy with their purchases and their customer service, they should do the same for you!

That's it, now you are an eBay seller. Now, rinse and repeat! Well, that is a simplified version of the process, but I guarantee you, it is not difficult to start in just a few days and you can earn some extra money.

I hope I have given you some food for thought and that you remain optimistic about their financial future. I know from personal experience, the success of eBay is easily accessible to anyone, regardless of their origin or current skill level. You just have to work at it and can absorb all the information you need on the road.

Source:http://www.selfgrowth.com/articles/beneficial-ebay-product-scraping

Learn What to Sell to Make Money on eBay in Three Easy Steps

The internet is big business. There's no denying it. Individuals have been flocking home to their computers in a desperate attempt to take advantage, and to make a quick pound or two from the comfort of their sofas. You've undoubtedly heard tales of the internet millionaires that have changed their lives through this medium, but perhaps you've heard less about the millions that have been less successful; scraping a living or perhaps making nothing at all. eBay is an excellent tool to help you to make a living doing something enjoyable, but to save yourself joining the unnamed masses that haven't succeeded you need to be aware of what to sell to make money on eBay. The following steps will help you work toward your goals and start to generate an income from the auction website.

Step one - Create a list of your interests and areas of expertise

What inspires you to get up in the mornings? What do you enjoy doing at your weekends? What topic could you chat about for hours without running out of things to say? Chances are it's these areas that you will have the most success with when learning what to sell to make money on eBay. Grab yourself a piece of paper and a pen and start to jot down some of the things that you are interested in. If you can't think of anything have a wander around your home and look for products that you've purchased for inspiration.

Step two - Narrow down your list

It's time to cut back the list to give us one final product that will be profitable to sell. The first step here is to identify ideas on your list that have a particular product niche which you could utilise. For example, let's say one of your areas of expertise was the subject of weight loss using yoga techniques. Potential products relating to this area could be DVDs or CD Books. Write down the potential products next to each item on the list, and cross out any if you can't think of an item that you could sell in relation to it. Try to select a specific topic. The subject of weight loss, for example, is enormous and is likely to be highly competitive. Weight loss by yoga however, could be a more exclusive niche. If you can't narrow down an item on your list then remove it.

Step three - Do your homework

With your short list of potential products to sell head over to eBay itself. Using the advanced search functionality provided by the website you will be able to look for similar products, seeing how well they sell, how many other people are selling similar things and even the time of day that the products sell best at. You can also head over to eBay Pulse, a site that will highlight the most searched for terms on eBay at the moment. With this information you should soon be able to narrow down your list to one specific niche of product that sells well, but isn't overrun with competition.

You'll still need to source somewhere to buy your products from, but with this initial thought into what you will sell you will be well on your way to learning what to sell to make money on eBay.

Source:http://ezinearticles.com/?Learn-What-to-Sell-to-Make-Money-on-eBay-in-Three-Easy-Steps&id=3788034

Wednesday, 22 May 2013

Collecting Data With Web Scrapers

There is a large amount of data available only through websites. However, as many people have found out, trying to copy data into a usable database or spreadsheet directly out of a website can be a tiring process. Data entry from internet sources can quickly become cost prohibitive as the required hours add up. Clearly, an automated method for collating information from HTML-based sites can offer huge management cost savings.

Web scrapers are programs that are able to aggregate information from the internet. They are capable of navigating the web, assessing the contents of a site, and then pulling data points and placing them into a structured, working database or spreadsheet. Many companies and services will use programs to web scrape, such as comparing prices, performing online research, or tracking changes to online content.

Let's take a look at how web scrapers can aid data collection and management for a variety of purposes.

Improving On Manual Entry Methods

Using a computer's copy and paste function or simply typing text from a site is extremely inefficient and costly. Web scrapers are able to navigate through a series of websites, make decisions on what is important data, and then copy the info into a structured database, spreadsheet, or other program. Software packages include the ability to record macros by having a user perform a routine once and then have the computer remember and automate those actions. Every user can effectively act as their own programmer to expand the capabilities to process websites. These applications can also interface with databases in order to automatically manage information as it is pulled from a website.

Aggregating Information

There are a number of instances where material stored in websites can be manipulated and stored. For example, a clothing company that is looking to bring their line of apparel to retailers can go online for the contact information of retailers in their area and then present that information to sales personnel to generate leads. Many businesses can perform market research on prices and product availability by analyzing online catalogues.

Data Management

Managing figures and numbers is best done through spreadsheets and databases; however, information on a website formatted with HTML is not readily accessible for such purposes. While websites are excellent for displaying facts and figures, they fall short when they need to be analyzed, sorted, or otherwise manipulated. Ultimately, web scrapers are able to take the output that is intended for display to a person and change it to numbers that can be used by a computer. Furthermore, by automating this process with software applications and macros, entry costs are severely reduced.

This type of data management is also effective at merging different information sources. If a company were to purchase research or statistical information, it could be scraped in order to format the information into a database. This is also highly effective at taking a legacy system's contents and incorporating them into today's systems.

Overall, a web scraper is a cost effective user tool for data manipulation and management.

Source:http://ezinearticles.com/?Collecting-Data-With-Web-Scrapers&id=4223877

Scraper Pro Gold - The Secret to ENDLESS Leads!

There are a number of reasons that home-based businesses fail today but the primary reason is insufficient lead generation. If you asked the average home-based business owner if they would benefit from having an unlimited source of sales leads available with just the click of their mouse, they would answer with a resounding "YES!" Fortunately, there is an answer to the dilemma where sales lead generation is concerned. It's called Scraper Pro Gold and it is one of the most unique yet effective sales lead generation systems on the market today.

The software enables you to harvest sales leads from the internet by using different targeted keywords. As an example of how this works, you can type in the keywords "home-based business" the Scraper Pro Gold system will pull in dozens of leads from a number of directories and search engines that relates to the keywords you entered. Additionally, you can use the names of different MLM products as keywords in order to obtain a list of their distributors which opens up more sales avenues for you.

Click Here to watch the Scraper Pro Gold video that we have posted there. Once you implement the system, you will be amazed at how quickly you will obtain hundreds of FREE sales leads which oftentimes include e-mail addresses, fax numbers, and phone numbers. You basically start contacting these leads asking them the question "Would your business be more successful if you had an unlimited source of FREE sales leads for life?" You can also contact home-based business owners as well.

Naturally, they are going to tell you "YES" which will give you an opportunity to discuss how the Scraper Pro Gold system works. This is by far the easiest software that you can use and operate. You simply type in the keywords, then choose the directories and search engines (as well as the states) that you want to target. After that, just let the system run and see how you will never have to purchase any sales leads again. It's just that simple.

You're probably wondering "if the system is so great, why do you want to share it with others?" The main reason is that the company that created and developed the Scraper Pro Gold software system has created an outstanding referral program that you will quickly benefit from, along with the multitude of leads! If you visit the scraper pro gold website here, you can learn more about this amazing system and get started generating unlimited FREE sales leads TODAY!

Best of all, there is only a one-time fee for marketing this program and starting to generate hundreds, if not thousands, of ongoing sales leads. You can create revenue in one of two ways with the Scraper Pro Gold system. You can either contact your leads and start telling them about the primary program, or you can sell the program to others if you want. One way or the other, you're going to generate an unlimited amount of leads and start benefiting from the system immediately!

Source:http://ezinearticles.com/?Scraper-Pro-Gold---The-Secret-to-ENDLESS-Leads!&id=5106877

Corporate Website Development Marketing Tips

Corporate website development is much more than just creating your website and putting it online. When developing your site you must consider marketing as a foundation to the development of your online presence. Businesses who fail to approach development from a marketing mind often find themselves dissatisfied with results of their site.

Corporate Marketing Tips

These are a few things to consider when developing your site that you want to make sure you communicate with your developer. Remember, often times people who develop or build websites are good at the technical aspect of the process but have minimal knowledge as to the successful marketing implementation.

1.Prominent and focused call to action - this is the process of leading your visitor down a path that is predefined by you. Most websites fail to guide the visitor down a specific path, which results in a site that does not perform as it should. An example of this could be a video that invites the visitor to put in their information to receive something of value. Additionally, it could be as simple as direct verticals that is has clear navigation and specific action.
   
2.Social media integration - the online world has drastically changed with social media being a driving force effecting the way we communicate and validate as a culture. This corporate website development marketing tip is critical if you want to engage your visitor. Social media integration can drastically increase your marketing results as other people share and approve of your content.
   
3.Blog Integration - this is a must for any new corporate development. This concept is foreign to most businesses as they don't understand the value in having a blog integrated on their corporate site. There are many reasons why a blog should be included. A few main reasons include, adding value to the visitor, giving people a reason to come back to your site, creating relevance in the search engine and increasing website authority.
   
4.Niche Keyword Research - this is a major downfall of most online development companies. They are able to make a nice looking site, however, they fail to understand the importance of developing the corporate website around the keyword research. Think of keyword research as the foundation, just as if you were to build a sky scraper, the strength of that structure begins with laying the proper foundation.

These are just a few of the important marketing tips to consider when developing your corporate website. Focusing on these will position your site ahead of those in your market who don't understand successful online asset development.

Source:http://ezinearticles.com/?Corporate-Website-Development-Marketing-Tips&id=6087459

Promoting Your Website Through Writing Articles

One of the most popular methods of helping your website is through the writing of articles and then publishing them on websites / ezines who allow articles to be submitted. There are several things to bear in mind for the successful use of articles.

1. For articles to have the best effect they should not be duplicated on your site. If you submit articles already on your site, you will lose the unique content from your site. Unfortunately this approach does mean hard work. If you write a good article it seems a shame not to have it your own site as well. One approach I would suggest is that if you wanted to promote "yoga exercises" I would first create good pages and articles about "yoga exercises". I would put these on my own site. (Before promoting a site you should make sure there is something worthwhile promoting). Then I would write an article specifically for the purpose of promoting this site with appropriate links. This means no matter how many times the article gets copied you will not get any duplicated content issues and not be associated with "scraper sites"

2. Of course there are no hard and fast rules, some people have said they have reproduced their own articles without any adverse consequences. Also it may depend on your goals of writing articles. If it is really good article publishing it in more than one place may give you the benefit of having many people reading it. However I would be careful about doing this too much, especially since Google is likely to be working to devalue this SEO technique.

3. If you want to promote a site on "yoga exercises" make sure you write articles on a related theme. This might be general articles on yoga, meditation, personal well being e.t.c. Links will only be valued when they come from sites and articles with the keywords you want to promote.

4. Related to the above point is developments from Google. Google is working hard to stop "google bombing". Remember the days when "miserable failure" used to return a page on an American President? Now it is no longer does, Google is increasingly suspicious of links from unrelated pages. Thus if you link to your yoga site from an article on "Varieties of English Cheeses during the late medieval period of 1600-1700". Google will probably view your yoga links as "link spam". It is not inconceivable your site may get a bad reputation with Google if you do this too much.

5. Correct linking from your article. Usually ezines allow 1 or 2 links in your article to your own site. To get the most benefit from link I would suggest this:

a) link anchor text of a keyword you wish to promote "yoga exercises" or "guide to yoga"

b) It is also useful to have one link as the site URL make it a live link. This means even if other sites strip out html you will still have a link.

c) Vary links. Don't always use the same resource box. Google likes natural links. Change the anchor link text, link to different pages. Don't just link to the homepage. The key is variety.

d) Putting links in the main body of the article will reduce the chance of it being copied by other sites. However for some articles I will still add a link in middle of text because these are more valuable than links at bottom.

6. The key to success is to write an article that other website will want to copy this will give you the widest exposure and maximum number of links. Good articles are informative, simple and easy to read. They are not ego driven. Also don't make a blatant sales pitch in your article. As Christopher Knight of  says "You are aiming to promote your article not your site"

7. Make sure your title has good keywords. It should be at least 3-4 words and be descriptive of your article. If the keywords are good it will improve your chance of getting good Google ranking for the article. In turn this will increase the chance of it getting copied by other sites.

8. Do try to have a good quality article so that it gets copied by good quality websites. There is little if any benefit from it being copied by many of the scrapper sites. (sites which offer no unique content but just copy others and then add Google adsense)

Source:http://ezinearticles.com/?Promoting-Your-Website-Through-Writing-Articles&id=434948