Friday, 23 June 2017

Data Scraping Doesn’t Have to Be Hard

All You Need Is the Right Data Scraping Partner

Odds are your business needs web data scraping. Data scraping is the act of using software to harvest desired data from target websites. So, instead of you spending every second scouring the internet and copying and pasting from the screen, the software (called “spiders”) does it for you, saving you precious time and resources.

Departments across an organization will profit from data scraping practices.

Data scraping will save countless hours and headaches by doing the following:

- Monitoring competitors’ prices, locations and service offerings
- Harvesting directory and list data from the web, significantly improving your lead generation
- Acquiring customer and product marketing insight from forums, blogs and review sites
- Extracting website data for research and competitive analysis
- Social media scraping for trend and customer analysis
- Collecting regular or even real time updates of exchange rates, insurance rates, interest rates, -mortgage rates, real estate, stock prices and travel prices

It is a no-brainer, really. Businesses of all sizes are integrating data scraping into their business initiatives. Make sure you stay ahead of the competition by effectively data scraping.

Now for the hard part

The “why should you data scrape?” is the easy part. The “how” gets a bit more difficult. Are you savvy in Python and HTML? What about JavaScript and AJAX? Do you know how to utilize a proxy server? As your data collection grows, do you have the cloud-based infrastructure in place to handle the load? If you or someone at your organization can answer yes to these questions, do they have the time to take on all the web data scraping tasks? More importantly, is it a cost-effective use of your valuable staffing resources for them to do this? With constantly changing websites, resulting in broken code and websites automatically blacklisting your attempts, it could be more of a resource drain than anticipated.

Instead of focusing on all the issues above, business users should be concerned with essential questions such as:

- What data do I need to grow my business?
- Can I get the data I need, when I want it and in a format I can use?
- Can the data be easily stored for future analysis?
- Can I maximize my staffing resources and get this data without any programming knowledge or IT assistance?
- Can I start now?
- Can I cost-effectively collect the data needed to grow my business?

A web data scraping partner is standing by to help you!

This is where purchasing innovative web scraping services can be a game changer. The right partner can harness the value of the web for you. They will go into the weeds so you can spend your precious time growing your business.

Hold on a second! Before you run off to purchase data scraping services, you need to make sure you are looking for the solution that best fits your organisational needs. Don’t get overwhelmed. We know that relinquishing control of a critical business asset can be a little nerve-wracking. To help, we have come up with our steps and best practices for choosing the right data scraping company for your organisation.

1) Know Your Priorities

We have brought this up before, but when going through a purchasing decision process we like to turn to Project Management 101: The Project Management Triangle. For this example, we think a Euler diagram version of the triangle fits best.
Data Scraping and the Project Management Triangle

In this example, the constraints show up as Fast (time), Good (quality) and Cheap (cost). This diagram displays the interconnection of all three elements of the project. When using this diagram, you are only able to pick two priorities. Only two elements may change at the expense of the third:

- We can do the project quickly with high quality, but it will be costly
- We can do the project quickly at a reduced cost, but quality will suffer
- We can do a high-quality project at a reduced cost, but it will take much longer
Using this framework can help you shape your priorities and budget. This really, in turn, helps you search for and negotiate with a data scraping company.

2) Know your budget/resources.

This one is so important it is on here twice. Knowing your budget and staffing resources before reaching out to data scraping companies is key. This will make your search much more efficient and help you manage the entire process.

3) Have a plan going in.

Once again, you should know your priorities, budget, business objectives and have a high-level data scraping plan before choosing a data scraping company. Here are a few plan guidelines to get you started:

- Know what data points to collect: contact information, demographics, prices, dates, etc.
- Determine where the data points can most likely be found on the internet: your social media and review sites, your competitors’ sites, chambers of commerce and government sites, e-commerce sites your products/competitors’ products are sold, etc.
- What frequency do you need this data and what is the best way to receive it? Make sure you can get the data you need and in the correct format. Determine whether you can perform a full upload each time or just the changes from the previous dataset. Think about whether you want the data delivered via email, direct download or automatically to your Amazon S3 account.
- Who should have access to the data and how will it be stored once it is harvested?
- Finally, the plan should include what you are going to do with all this newly acquired data and who is receiving the final analysis.

4) Be willing to change your plan.

This one may seem counterintuitive after so much focus on having a game plan. However, remember to be flexible. The whole point of hiring experts is that they are the experts. A plan will make discussions much more productive, but the experts will probably offer insight you hadn’t thought of. Be willing to integrate their advice into your plan.

5) Have a list of questions ready for the company.

Having a list of questions ready for the data scraping company will help keep you in charge of the discussions and negotiations. Here are some points that you should know before choosing a data scraping partner:
- Can they start helping you immediately? Make sure they have the infrastructure and staff to get - you off the ground in a matter of weeks, not months.
- Make sure you can access them via email and phone. Also make sure you have access to those -actually performing the data scraping, not just a call center.
- Can they tailor their processes to fit with your requirements and organisational systems?
- Can they scrape more than plain text? Make sure they can harvest complex and dynamic sites -with JavaScript and AJAX. If a website’s content can be viewed on a browser, they should be-- able to get it for you.
- Make sure they have monitoring systems in place that can detect changes, breakdowns, and -quality issues. This will ensure you have access to a persistent and reliable flow of data, even - when the targeted websites change formats.
- As your data grows, can they easily keep up? Make sure they have scalable solutions that could - handle all that unstructured web data.
- Will they protect your company? Make sure they know discretion is important and that they will not advertise you as a client unless you give permission. Also, check to see how they disguise their scrapers so that the data harvesting cannot be traced back to your business.

6) Check their reviews.

Do a bit of your own manual data scraping to see what others business are saying about the companies you are researching.

7) Make sure the plan the company offers is cost-effective.

Here are a few questions to ask to make sure you get a full view of the costs and fees in the estimate:
- Is there a setup fee?
- What are the fixed costs associated with this project?
- What are the variable costs and how are they calculated?
- Are there any other taxes, fees or things that I could be charged for that are not listed on this -quote?
- What are the payment terms?

Source Url :-http://www.data-scraping.com.au/data-scraping-doesnt-have-to-be-hard/

Tuesday, 20 June 2017

Scraping Dynamic Websites: How We Tackle the Problem

Scraping Dynamic Websites: How We Tackle the Problem

Acquiring data from the web for business applications has already gained popularity if we look at the sheer number of use cases. Companies have realized the value addition provided by data and are looking for better and efficient ways of data extraction. However, web scraping is a niche technical process that takes years to master given the dynamic nature of the web. Since every website is different and custom coded, it’s not possible to write a single program that can handle multiple websites. The web scraping setup should be coded separately for each target site and this needs a team of skilled programmers.

Web scraping is without doubt a complex trade; however if the target site in question employs dynamic coding practices, this complexity is further multiplied. Over the years, we have understood the technical nuances of web scraping and perfected our modus operandi to to scrape dynamic websites with high accuracy and efficiency. Here are some ways how we tackle the challenge of scraping dynamic websites.

1. Proxies

Some websites have different Geo/Device/OS/browser specific versions that they serve depending on the variables. This could give a great deal of confusion to the crawlers especially while figuring out how to extract the right version. This will need some manual work in terms of finding the different versions provided by the site and configuring proxies to fetch the right version as per the requirement. For geo-specific versions, the crawler is simply deployed on a server from where the required version of the site is accessible.

2. Browser automation

When it comes to websites that use very complex and dynamic code, it’s better have all the page content rendered using a browser first. Selenium can be used for browser automation which will help us do the scraping. It is essentially a handy toolkit that can drive the browser from your favorite programming language. Although it’s primarily used for testing, it can be used for scraping dynamic web pages. It can be used to control a web browser, which is how scraping using selenium is typically done. In this case, the browser first renders the page which will help overcome the problem of reverse engineering JavaScript code to fetch the page content. Once the page content is rendered, it is saved locally to scrape the required data points later. Although this is comparatively easy, there is a high chance of encountering errors while scraping using the browser automation method.

3. Handling POST requests

Many web pages will only display the data that we need after receiving a certain input from the user. Let’s say you are looking for used cars data from a particular geo-location on a classified site. The website would first require you to enter the ZIP code of the location from where you need listings from. This ZIP code must be sent to the website as a post request while scraping. We craft the post request using the appropriate parameters so as to reach the target page that contains all the data points to be scraped.

4. Manufacturing the JSON URL

There are dynamic web pages that use AJAX calls to load and refresh the page content. These are particularly difficult to scrape and extract data from as the triggers that make up the JSON file is difficult to trace. This requires a lot of manual inspection and testing, but once the appropriate parameters are identified, a JSON file that would fetch the target page which includes the desired data points can be manufactured. This JSON file is often tweaked automatically for navigation or fetching varying data points. Manufacturing the JSON URL with apt parameters is the primary pain point with web pages that use AJAX calls.
Bottom-line

Scraping dynamic web pages is extremely complicated and demands deep expertise in the field of web scraping. It also demands an extensive tech stack and well-built infrastructure that can handle the complexities associated with web data extraction. With our years of expertise and well-evolved web scraping infrastructure, we cater to data requirements where dynamic web pages are involved on a daily basis.

Source:https://www.promptcloud.com/blog/scraping-dynamic-websites-web-scraping

Monday, 5 June 2017

How We Maintain Data Quality While Handling Large Scale Extraction

How We Maintain Data Quality While Handling Large Scale Extraction

The demand for high quality data is increasing along with the rise in products and services that require data to run. Although the information available on the web is increasing in terms of quantity and quality, extracting it in a clean, usable format remains challenging to most businesses. Having been in the web data extraction business for long enough, we have come to identify the best practices and tactics that would ensure high quality data from the web.

At PromptCloud, we not only make sure data is accessible to everyone, we make sure it’s of high quality, clean and delivered in a structured format. Here is how we maintain the quality while handling zettabytes of data for hundreds of clients from across the world.

Manual QA process

1. Crawler review

Every web data extraction project starts with the crawler setup. Here, the quality of the crawler code and its stability is of high priority as this will have a direct impact on the data quality. The crawlers are programmed by our tech team members who have high technical acumen and experience. Once the crawler is made, two peers review the code to make sure that the optimal approach is used for extraction and to ensure there are no inherent issues with the code. Once this is done, the crawler is deployed on our dedicated servers.

2. Data review

The initial set of data starts coming in when the crawler is run for the first time. This data is manually inspected, first by the tech team and then by one of our business representatives before the setup is finalized. This manual layer of quality check is thorough and weeds out any possible issues with the crawler or the interaction between the crawler and website. If issues are found, the crawler is tweaked to eliminate them completely before the setup is marked complete.

Automated monitoring

Websites get updated over time, quite frequently than you’d imagine. Some of these changes could break the crawler or cause it to start extracting the wrong data. This is why we have developed a fully automated monitoring system to watch over all the crawling jobs happening on our servers. This monitoring system continuously checks the incoming data for inconsistencies and errors. There are three types of issues it can look for:

1. Data validation errors

Every data point has a defined value type. For example, the data point ‘Price’ will always have a numerical value and not text. In cases of website changes, there can be class name mismatches that might cause the crawler to extract wrong data for a certain field. The monitoring system will check if all the data points are in line with their respective value types. If an inconsistency is found, the system immediately sends out a notification to the team members handling that project and the issue is fixed promptly.

2. Volume based inconsistencies

There can be cases where the volume count for records significantly drop or increase in an irregular fashion. This is a red sign as far as web crawling goes. The monitoring system will already have the expected record count for different projects. If inconsistencies are spotted in the data volumes, the system sends out a prompt notification.

3. Site changes

Structural changes happening to the target websites is the main reason why crawlers break. This is monitored by our dedicated monitoring system, quite aggressively. The tool performs frequent checks on the target site to make sure nothing has changed since the previous crawl. If changes are found, it sends out notifications for the same.
High end servers

It is understood that web crawling is a resource-intensive process that needs high performance servers. The quality of servers will determine how smooth the crawling happens and this in turn has an impact on the quality of data. Having firsthand experience in this, we use high-end servers to deploy and run our crawlers. This helps us avoid instances where crawlers fail due to the heavy load on servers.

Data cleansing

The initially crawled data might have unnecessary elements like HTML tags. In that sense, this data can be called crude. Our cleansing system does an exceptionally good job at eliminating these elements and cleaning up the data thoroughly. The output is clean data without any of the unwanted elements.

Structuring

Structuring is what makes the data compatible with databases and analytics systems by giving it a proper, machine readable syntax. This is the final process before delivering the data to the clients. With structuring done, the data is ready to be consumed either by importing it to a database or plugging to an analytics system. We deliver the data in multiple formats – XML, JSON and CSV which also adds to the convenience of handling it.

Source:https://www.promptcloud.com/blog/how-we-maintain-data-quality-web-data-extraction