Thursday, 26 September 2013

Using External Input Data in Off-the-shelf Web Scrapers

There is a question I’ve wanted to shed some light upon for a long time already: “What if I need to scrape several URL’s based on data in some external database?“.

For example, recently one of our visitors asked a very good question (thanks, Ed):

    “I have a large list of amazon.com asin. I would like to scrape 10 or so fields for each asin. Is there any web scraping software available that can read each asin from a database and form the destination url to be scraped like http://www.amazon.com/gp/product/{asin} and scrape the data?”

This question impelled me to investigate this matter. I contacted several web scraper developers, and they kindly provided me with detailed answers that allowed me to bring the following summary to your attention:
Visual Web Ripper

An input data source can be used to provide a list of input values to a data extraction project. A data extraction project will be run once for each row of input values. You can find the additional information here.
Web Content Extractor

You can use the -at”filename” command line option to add new URLs from TXT or CSV file:

    WCExtractor.exe projectfile -at”filename” -s

projectfile: the file name of the project (*.wcepr) to open.
filename – the file name of the CSV or TXT file that contains URLs separated by newlines.
-s – starts the extraction process

You can find some options and examples here.
Mozenda

Since Mozenda is cloud-based, the external data needs to be loaded up into the user’s Mozenda account. That data can then be easily used as part of the data extracting process. You can construct URLs, search for strings that match your inputs, or carry through several data fields from an input collection and add data to it as part of your output. The easiest way to get input data from an external source is to use the API to populate data into a Mozenda collection (in the user’s account). You can also input data in the Mozenda web console by importing a .csv file or importing one through our agent building tool.

Once the data is loaded into the cloud, you simply initiate building a Mozenda web agent and refer to that Data list. By using the Load page action and the variable from the inputs, you can construct a URL like http://www.amazon.com/gp/product/%asin%.
Helium Scraper

Here is a video showing how to do this with Helium Scraper:

The video shows how to use the input data as URLs and as search terms. There are many other ways you could use this data, way too many to fit in a video. Also, if you know SQL, you could run a query to get the data directly from an external MS Access database like
SELECT * FROM [MyTable] IN "C:\MyDatabase.mdb"

Note that the database needs to be a “.mdb” file.
WebSundew Data Extractor
Basically this allows using input data from external data sources. This may be CSV, Excel file or a Database (MySQL, MSSQL, etc). Here you can see how to do this in the case of an external file, but you can do it with a database in a similar way (you just need to write an SQL script that returns the necessary data).
In addition to passing URLs from the external sources you can pass other input parameters as well (input fields, for example).
Screen Scraper

Screen Scraper is really designed to be interoperable with all sorts of databases. We have composed a separate article where you can find a tutorial and a sample project about scraping Amazon products based on a list of their ASINs.

Source: http://extract-web-data.com/using-external-input-data-in-off-the-shelf-web-scrapers/

Wednesday, 25 September 2013

A simple way to turn a website into JSON

Recently, while surfing the web I stumbled upon an simple web scraping service named Web Scrape Master. It is a kind of RESTful web service that extracts data from a specified web site and returns it to you in JSON format.
How it works

Though I don’t know what this service may be useful for, I still like its simplicity: all you need to do is to make an HTTP GET request, passing all necessary parameters in the query string:
http://webscrapemaster.com/api/?url={url}&xpath={xpath}&attr={attr}&callback={callback}

    url  - the URL of the website you want to scrape
    xpath – xpath determining the data you need to extract
    attr - attribute the name you need to get the value of (optional)
    callback - JSON callback function (optional)

For example, for the following request to our testing ground:

http://webscrapemaster.com/api/?url=http://testing-ground.extract-web-data.com/blocks&xpath=//div[@id=case1]/div[1]/span[1]/div

You will get the following response:

[{"text":"<div class='name'>Dell Latitude D610-1.73 Laptop Wireless Computer</div>","attrs":{"class":"name"}}]
Visual Web Scraper

Also, this service offers a special visual tool for building such requests. All you need to do is to enter the URL of the website and click to the element you need to scrape:
Visual Web Scraper
Conclusion

Though I understand that the developer of this service is attempting to create a simple web scraping service, it is still hard to imagine where it can be useful. The task that the service does can be easily accomplished by means of any language.

Probably if you already have software receiving JSON from the web, and you want to feed it with data from some website, then you may find this service useful. The other possible application is to hide your IP when you do web scraping. If you have other ideas, it would be great if you shared them with us.



Source: http://extract-web-data.com/a-simple-way-to-turn-a-website-into-json/

Tuesday, 24 September 2013

Selenium IDE and Web Scraping

Selenium is a browser automation framework that includes IDE, Remote Control server and bindings of various flavors including Java, .Net, Ruby, Python and other. In this post we touch on the basic structure of the framework and its application to  Web Scraping.
What is Selenium IDE


Selenium IDE is an integrated development environment for Selenium scripts. It is implemented as a Firefox plugin, and it allows recording browsers’ interactions in order to edit them. This works well for software tests, composing and debugging. The Selenium Remote Control is a server specific for a particular environment; it causes custom scripts to be implemented for controlled browsers. Selenium deploys on Windows, Linux, and iOS. How various Selenium components are supported with major browsers read here.
What does Selenium do and Web Scraping

Basically Selenium automates browsers. This ability is no doubt to be applied to web scraping. Since browsers (and Selenium) support JavaScript, jQuery and other methods working with dynamic content why not use this mix for benefit in web scraping, rather than to try to catch Ajax events with plain code? The second reason for this kind of scrape automation is browser-fasion data access (though today this is emulated with most libraries).

Yes, Selenium works to automate browsers, but how to control Selenium from a custom script to automate a browser for web scraping? There are Selenium PHP and other language libraries (bindings) providing for scripts to call and use Selenium. It is possible to write Selenium clients (using the libraries) in almost any language we prefer, for example Perl, Python, Java, PHP etc. Those libraries (API), along with a server, the Java written server that invokes browsers for actions, constitute the Selenum RC (Remote Control). Remote Control automatically loads the Selenium Core into the browser to control it. For more details in Selenium components refer to here.



A tough scrape task for programmer

“…cURL is good, but it is very basic.  I need to handle everything manually; I am creating HTTP requests by hand.
This gets difficult – I need to do a lot of work to make sure that the requests that I send are exactly the same as the requests that a browser would
send, both for my sake and for the website’s sake. (For my sake
because I want to get the right data, and for the website’s sake
because I don’t want to cause error messages or other problems on their site because I sent a bad request that messed with their web application).  And if there is any important javascript, I need to imitate it with PHP.
It would be a great benefit to me to be able to control a browser like Firefox with my code. It would solve all my problems regarding the emulation of a real browser…
it seems that Selenium will allow me to do this…” -Ryan S

Yes, that’s what we will consider below.
Scrape with Selenium

In order to create scripts that interact with the Selenium Server (Selenium RC, Selenium Remote Webdriver) or create local Selenium WebDriver script, there is the need to make use of language-specific client drivers (also called Formatters, they are included in the selenium-ide-1.10.0.xpi package). The Selenium servers, drivers and bindings are available at Selenium download page.
The basic recipe for scrape with Selenium:

    Use Chrome or Firefox browsers
    Get Firebug or Chrome Dev Tools (Cntl+Shift+I) in action.
    Install requirements (Remote control or WebDriver, libraries and other)
    Selenium IDE : Record a ‘test’ run thru a site, adding some assertions.
    Export as a Python (other language) script.
    Edit it (loops, data extraction, db input/output)
    Run script for the Remote Control

The short intro Slides for the scraping of tough websites with Python & Selenium are here (as Google Docs slides) and here (Slide Share).
Selenium components for Firefox installation guide

For how to install the Selenium IDE to Firefox see  here starting at slide 21. The Selenium Core and Remote Control installation instructions are there too.
Extracting for dynamic content using jQuery/JavaScript with Selenium

One programmer is doing a similar thing …

1. launch a selenium RC (remote control) server
2. load a page
3. inject the jQuery script
4. select the interested contents using jQuery/JavaScript
5. send back to the PHP client using JSON.

He particularly finds it quite easy and convenient to use jQuery for
screen scraping, rather than using PHP/XPath.
Conclusion

The Selenium IDE is the popular tool for browser automation, mostly for its software testing application, yet also in that Web Scraping techniques for tough dynamic websites may be implemented with IDE along with the Selenium Remote Control server. These are the basic steps for it:

    Record the ‘test‘ browser behavior in IDE and export it as the custom programming language script
    Formatted language script runs on the Remote Control server that forces browser to send HTTP requests and then script catches the Ajax powered responses to extract content.

Selenium based Web Scraping is an easy task for small scale projects, but it consumes a lot of memory resources, since for each request it will launch a new browser instance.



Source: http://extract-web-data.com/selenium-ide-and-web-scraping/

Monday, 23 September 2013

Every Business Organization Needs Data Entry Services

Data entry is the main component of any business firm. They use this to maintain records of all sorts in a properly way. Although it seems to be an easier task but this is not the scenario, the work has to be done very cautiously and efficiently by the professional as data is very crucial. Data is priceless for any organization irrespective of their size and strength. Today, huge changes in the business industry have taken place and so businesses are adopting such new advanced techniques. These high end technologies have helped the data entry services in becoming much easier and efficient than ever before. If you are seeking to this service then must be prepared to spend more for this. So hiring this service will certainly help your business towards upward growth. Well, being the owner of your business, you are the best person to judge what will be a good strategy for your business. You can either hire a professional or can hire an outside firm to assist your data entry services task.

The newer methods of data entry services have over lapped the older and traditional methods of this service. Earlier, this service was done manually and obviously in-accuracy was found much more. So, information technology enabled services have come up with the new process that has made this service highly accurate and much easier. Indeed, every business wants to deal with this service very efficiently and accurately and so many have taken this highly enabled service for their firm. Data entry services are the key aspect of any business organization and every business needs a proper system to maintain its data and records. As data is crucial aspect of any firm irrespective of specialization or size and so they are in need of such an efficient system that can undertake their task.

An in-house data entry services would be more advantageous as you can keep a watch on the task done by professional. You can look into the procedure and other stuff that they do for your business. This can be bit expensive for your business as you will have to pay more as being an employee they are eligible for bonuses, allowances and other stuffs. If you are not satisfied with this option then you can undertake the services of a third party vendor. You can hand-over your entire task of data entry to them and can relieve of getting an efficient services. This can truly relieve you of getting a better service from them as you can get your task done in the way you desire. This option has proved to be more advantageous and proficient for many businesses. Now a day's data conversion process is highly accessed by many business firms and so gaining momentum on a large scale.

Data conversion is being done without any hassle and brings more customers to buy the products. Outsourcing of data entry services has seen huge success and businesses have seen huge profits through this service. This service has proved as a cost effective business strategy for businesses and have seen huge surge in their revenue.So, it's quite obvious that hiring data entry services from a third party vendor is better for the business then why to hire an in-house professional.





Source: http://ezinearticles.com/?Every-Business-Organization-Needs-Data-Entry-Services&id=596342

Sunday, 22 September 2013

What is Data Mining? Why Data Mining is Important?

Searching, Collecting, Filtering and Analyzing of data define as data mining. The large amount of information can be retrieved from wide range of form such as different data relationships, patterns or any significant statistical co-relations. Today the advent of computers, large databases and the internet is make easier way to collect millions, billions and even trillions of pieces of data that can be systematically analyzed to help look for relationships and to seek solutions to difficult problems.

The government, private company, large organization and all businesses are looking for large volume of information collection for research and business development. These all collected data can be stored by them to future use. Such kind of information is most important whenever it is require. It will take very much time for searching and find require information from the internet or any other resources.

Here is an overview of data mining services inclusion:

* Market research, product research, survey and analysis
* Collection information about investors, funds and investments
* Forums, blogs and other resources for customer views/opinions
* Scanning large volumes of data
* Information extraction
* Pre-processing of data from the data warehouse
* Meta data extraction
* Web data online mining services
* data online mining research
* Online newspaper and news sources information research
* Excel sheet presentation of data collected from online sources
* Competitor analysis
* data mining books
* Information interpretation
* Updating collected data

After applying the process of data mining, you can easily information extract from filtered information and processing the refining the information. This data process is mainly divided into 3 sections; pre-processing, mining and validation. In short, data online mining is a process of converting data into authentic information.

The most important is that it takes much time to find important information from the data. If you want to grow your business rapidly, you must take quick and accurate decisions to grab timely available opportunities.

Outsourcing Web Research is one of the best data mining outsourcing organizations having more than 17 years of experience in the market research industry. To know more information about our company please contact us.




Source: http://ezinearticles.com/?What-is-Data-Mining?-Why-Data-Mining-is-Important?&id=3613677

Friday, 20 September 2013

Unleash the Hidden Potential of Your Business Data With Data Mining and Extraction Services

Every business, small or large, is continuously amassing data about customers, employees and nearly every process in their business cycle. Although all management staff utilize data collected from their business as a basis for decision making in areas such as marketing, forecasting, planning and trouble-shooting, very often they are just barely scratching the surface. Manual data analysis is time-consuming and error-prone, and its limited functions result in the overlooking of valuable information that improve bottom-lines. Often, the sheer quantity of data prevents accurate and useful analysis by those without the necessary technology and experience. It is an unfortunate reality that much of this data goes to waste and companies often never realize that a valuable resource is being left untapped.

Automated data mining services allow your company to tap into the latent potential of large volumes of raw data and convert it into information that can be used in decision-making. While the use of the latest software makes data mining and data extraction fast and affordable, experienced professional data analysts are a key part of the data mining services offered by our company. Making the most of your data involves more than automatically generated reports from statistical software. It takes analysis and interpretation skills that can only be performed by experienced data analysis experts to ensure that your business databases are translated into information that you can easily comprehend and use in almost every aspect of your business.

Who Can Benefit From Data Mining Services?

If you are wondering what types of companies can benefit from data extraction services, the answer is virtually every type of business. This includes organizations dealing in customer service, sales and marketing, financial products, research and insurance.

How is Raw Data Converted to Useful Information?

There are several steps in data mining and extraction, but the most important thing for you as a business owner is to be assured that, throughout the process, the confidentiality of your data is our primary concern. Upon receiving your data, it is converted into the necessary format so that it can be entered into a data warehouse system. Next, it is compiled into a database, which is then sifted through by data mining experts to identify relevant data. Our trained and experienced staff then scan and analyze your data using a variety of methods to identify association or relationships between variables; clusters and classes, to identify correlations and groups within your data; and patterns, which allow trends to be identified and predictions to be made. Finally, the results are compiled in the form of written reports, visual data and spreadsheets, according to the needs of your business.

Our team of data mining, extraction and analyses experts have already helped a great number of businesses to tap into the potential of their raw data, with our speedy, cost-efficient and confidential services. Contact us today for more information on how our data mining and extraction services can help your business.



Source: http://ezinearticles.com/?Unleash-the-Hidden-Potential-of-Your-Business-Data-With-Data-Mining-and-Extraction-Services&id=4642076

Thursday, 19 September 2013

Using Charts For Effective Data Mining

The modern world is one where data is gathered voraciously. Modern computers with all their advanced hardware and software are bringing all of this data to our fingertips. In fact one survey says that the amount of data gathered is doubled every year. That is quite some data to understand and analyze. And this means a lot of time, effort and money. That is where advancements in the field of Data Mining have proven to be so useful.

Data mining is basically a process of identifying underlying patters and relationships among sets of data that are not apparent at first glance. It is a method by which large and unorganized amounts of data are analyzed to find underlying connections which might give the analyzer useful insight into the data being analyzed.

It's uses are varied. In marketing it can be used to reach a product to a particular customer. For example, suppose a supermarket while mining through their records notices customers preferring to buy a particular brand of a particular product. The supermarket can then promote that product even further by giving discounts, promotional offers etc. related to that product. A medical researcher analyzing D.N.A strands can and will have to use data mining to find relationships existing among the strands. Apart from bio-informatics, data mining has found applications in several other fields like genetics, pure medicine, engineering, even education.

The Internet is also a domain where mining is used extensively. The world wide web is a minefield of information. This information needs to be sorted, grouped and analyzed. Data Mining is used extensively here. For example one of the most important aspects of the net is search. Everyday several million people search for information over the world wide web. If each search query is to be stored then extensively large amounts of data will be generated. Mining can then be used to analyze all of this data and help return better and more direct search results which lead to better usability of the Internet.

Data mining requires advanced techniques to implement. Statistical models, mathematical algorithms or the more modern machine learning methods may be used to sift through tons and tons of data in order to make sense of it all.

Foremost among these is the method of charting. Here data is plotted in the form of charts and graphs. Data visualization, as it is often referred to is a tried and tested technique of data mining. If visually depicted, data easily reveals relationships that would otherwise be hidden. Bar charts, pie charts, line charts, scatter plots, bubble charts etc. provide simple, easy techniques for data mining.

Thus a clear simple truth emerges. In today's world of heavy load data, mining it is necessary. And charts and graphs are one of the surest methods of doing this. And if current trends are anything to go by the importance of data mining cannot be undermined in any way in the near future.




Source: http://ezinearticles.com/?Using-Charts-For-Effective-Data-Mining&id=2644996