Friday, 27 September 2013

Visual Web Ripper: Using External Input Data Sources

Sometimes it is necessary to use external data sources to provide parameters for the scraping process. For example, you have a database with a bunch of ASINs and you need to scrape all product information for each one of them. As far as Visual Web Ripper is concerned, 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.

An input data source is normally used in one of these scenarios:

    To provide a list of input values for a web form
    To provide a list of start URLs
    To provide input values for Fixed Value elements
    To provide input values for scripts

Visual Web Ripper supports the following input data sources:

    SQL Server Database
    MySQL Database
    OleDB Database
    CSV File
    Script (A script can be used to provide data from almost any data source)

To see it in action you can download a sample project that uses an input CSV file with Amazon ASIN codes to generate Amazon start URLs and extract some product data. Place both the project file and the input CSV file in the default Visual Web Ripper project folder (My Documents\Visual Web Ripper\Projects).

For further information please look at the manual topic, explaining how to use an input data source to generate start URLs.


Source: http://extract-web-data.com/visual-web-ripper-using-external-input-data-sources/

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/

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/

Effectiveness of Web Data Mining Through Web Research

Web data mining is systematic approach to keyword based and hyperlink based web research for gaining business intelligence. It requires analytical skills to understand hyperlink structure of given website. Hyperlinks possess enormous amount of hidden human annotations that can help automatically understand the authority. If the webmaster provides a hyperlink pointing to another website or web page, this action is perceived as an endorsement to that webpage. Search engines highly focus on such endorsements to define the importance of the page and place them higher in organic search results.

However every hyperlink does not refer to the endorsement since the webmaster may have used it for other purposes, such as navigation or to render paid advertisements. It is important to note that authoritative pages rarely provide informative descriptions. For an instant, Google's homepage may not provide explicit self-description as "Web search engine."

These features of hyperlink systems have forced researchers to evaluate another important webpage category called hubs. A hub is a unique, informative webpage that offers collections of links to authorities. It may have only a few links pointing to other web pages but it links to a collection of prominent sites on a single topic. A hub directly awards authority status on sites that focus on a single topic. Typically, a quality hub points to many quality authorities, and, conversely, a web page that many such hubs link to can be deemed as a superior authority.

Such approach of identifying authoritative pages has resulted in the development of various popularity algorithms such as PageRank. Google uses PageRank algorithm to define authority of each webpage for a relevant search query. By analyzing hyperlink structures and web page content, these search engines can render better-quality search results than term-index engines such as Ask and topic directories such as DMOZ.




Source: http://ezinearticles.com/?Effectiveness-of-Web-Data-Mining-Through-Web-Research&id=5094403

Monday, 23 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

Friday, 20 September 2013

Searching the Web Using Text Mining and Data Mining

There are many types of financial analysis tools that are useful for various purposes. Most of these are easily available online. Two such tools of software for financial analysis include the text mining and data mining. Both methods have been discussed in details in the following section.

The features of Text Mining It is a way by which information of high-quality can be derived from a text. It involves giving structure to the input text then deriving patterns within the data that has been structured. Finally, the process of evaluating and interpreting the output is undertaken.

This form of mining usually involves the process of structuring the text input, and deriving patterns within the structured data, and finally evaluating and interpreting the data. It differs from the way we are familiar with in searching the web. The goal of this method is to find unknown information. It can be done with analyses in topics that that were not researched before.

What is Data Mining? It is the process of the extraction of patterns from the data. Nowadays, it has become very vital to transform this data into information. It is particularly used in marketing practices as well as fraud detection and surveillance. We can extract hidden information from huge databases of information. It can be used to predict future trends as well as to aid the company business to make knowledgeable quick decisions.

Working of data mining: Modeling technique is used to perform the operation of such form of mining. For these techniques, you must need to be fully integrated with a data warehouse as well as financial analysis tools. Some of the areas where this method is used are:

    Pharmaceutical companies which need to analyze its sales force and to achieve their targets.
    Credit card companies and transportation companies with sales force.
    Also large consumer goods companies use such mining techniques.
    With this method, a retailer may utilize POS or point-of-sale data of customer purchases in order to develop strategies for sale promotion.

The major elements of Data mining:

1. Extracting, transforming, and sending load transaction data on the data warehouse of the server system.

2. Storing and managing the data in for database systems that are multidimensional in nature.

3. Presenting data to the IT professionals and business analysts for processing.

4. Presenting the data to the application software for analyses.

5. Presentation of the data in dynamic ways like graph or table.

The main point of difference between the two types of mining is that text mining checks the patterns from natural text instead of databases where the data is structured.

Data mining software supports the entire process of such mining and discovery of knowledge. These are available on the internet. Data mining software serves as one of the best financial analysis tools. You can avail of data mining software suites and their reviews freely over the internet and easily compare between them.




Source: http://ezinearticles.com/?Searching-the-Web-Using-Text-Mining-and-Data-Mining&id=5299621

Thursday, 19 September 2013

Data Mining vs Screen-Scraping

Data mining isn't screen-scraping. I know that some people in the room may disagree with that statement, but they're actually two almost completely different concepts.

In a nutshell, you might state it this way: screen-scraping allows you to get information, where data mining allows you to analyze information. That's a pretty big simplification, so I'll elaborate a bit.

The term "screen-scraping" comes from the old mainframe terminal days where people worked on computers with green and black screens containing only text. Screen-scraping was used to extract characters from the screens so that they could be analyzed. Fast-forwarding to the web world of today, screen-scraping now most commonly refers to extracting information from web sites. That is, computer programs can "crawl" or "spider" through web sites, pulling out data. People often do this to build things like comparison shopping engines, archive web pages, or simply download text to a spreadsheet so that it can be filtered and analyzed.

Data mining, on the other hand, is defined by Wikipedia as the "practice of automatically searching large stores of data for patterns." In other words, you already have the data, and you're now analyzing it to learn useful things about it. Data mining often involves lots of complex algorithms based on statistical methods. It has nothing to do with how you got the data in the first place. In data mining you only care about analyzing what's already there.

The difficulty is that people who don't know the term "screen-scraping" will try Googling for anything that resembles it. We include a number of these terms on our web site to help such folks; for example, we created pages entitled Text Data Mining, Automated Data Collection, Web Site Data Extraction, and even Web Site Ripper (I suppose "scraping" is sort of like "ripping"). So it presents a bit of a problem-we don't necessarily want to perpetuate a misconception (i.e., screen-scraping = data mining), but we also have to use terminology that people will actually use.

Todd Wilson is the owner of screen-scraper.com (http://www.screen-scraper.com/), a company which specializes in data extraction from web pages. While not scraping screens Todd is hard at work finishing up a doctoral degree in Instructional Psychology and Technology.




Source: http://ezinearticles.com/?Data-Mining-vs-Screen-Scraping&id=146813