Write a program that takes in input a set of search terms

Assignment Help Basic Computer Science
Reference no: EM13233839

write a program that takes in input a set of search terms, connects to Google's search engine, queries for the search terms, retrieves the HTML page containing the search results, parses the HTML results page to extract the URL of the top 5 search results, and outputs these top 5 URLs into a text file. The program must take the following command line arguments: -q "Query Keywords Here" -o OutputFile The -q argument is used to give the program the set of keywords to be queried on Google's search engine. The -o argument is the file where the program output must be stored. The program must also accept an additional -f option: -f InputFileName The -f option tells the program to read the HTML page containing the search results from a file, rather than retrieving it from the web. Essentially, the -f argument allows you to manually query Google's search engine, manually save the HTML page containing the search results into a file, and then pass this file to your program for parsing to extract again the top 5 URLs. Notice that the -o argument must always be present. On the other hand, -f is in alternative to -q. If both -f and -q are given, the program will ignore -q and only use the file provided as argument to -f for parsing. For example, the program (after it is compiled) needs to run as $ java GoogleScraper -q "UGA computer science" -o uga_search.txt or as $ java GoogleScraper -f uga_google_results.html -o uga_search.txt

Reference no: EM13233839

Questions Cloud

Compute its solubility at the temperature : The Ksp value for Copper (II) Iodide , Cu(IO3)2 is 1.4 x 10^-7 at 25 C calculate its solubility at this temperature.
Explain why firm should shut down n estimate shut-down price : The average cost is AVC = 3500 - 6Q + 0.005Q square If the industry is competitive, estimate the shut-down price. If the market price is below shut-down, regardless of fixed costs, explain why the firm should shut down.
Draw lessons from the change management programmes : Draw lessons from the change management programmes at CI and compare it with any Malaysian company, to understand the degree of compatibility in their line of action.
Compute the molar solubility : The Ksp of zinc oxalate (ZnC2O4) at a given temperature is 7.70 x 10-5 M. Calculate the molar solubility in 0.7657 M zinc nitrate at this temperature.
Write a program that takes in input a set of search terms : write a program that takes in input a set of search terms, connects to Google's search engine, queries for the search terms, retrieves the HTML page containing the search results
Three ways in which the restaurant can engage in socially : three ways in which the restaurant can engage in socially responsive activities in the commununity within which it operates.
Explain what is the ph naoh is added to the buffer : What is the pH if 100 mL of 1.00M NaOH is added to the buffer into 30.0 grams of solid NaF is placed in 1.00 liter of a 1.00M HF solution for Ha, Ka=6.8x10-4
How could two companies with similar gross profit figures : How could two companies with similar gross profit figures end up with dramatically different net operating income.
Compute the ksp at the temperature : The solubility of magnesium phosphate at a given temperature is 0.936 g/100 mL. Calculate the Ksp at this temperature.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Explain can capabilities protect against all trojan horses

Can capabilities protect against all Trojan horses? Either show that they can or describe a Trojan horse process that C-Lists cannot protect against.

  Design a java class to implement the add

Design a Java class to implement the "add, remove and isEmpty" functions Then design another class (including the main method) to test the above functions by using the following operations (assume the queue initially is empty).

  Corporate goal for scr new training activity

We require corporate goal for SCR which refers to new training activity. Create a draft to show Jesse. Draft project scope statement for TIMS system

  What is the new functionality

What are the main concepts and metaphors that have been used for each and what is the new functionality

  Describe the conceptual model of a two-dimensional array

Describe the conceptual model of a two-dimensional array. Include in your explanation how a two-dimensional array might be used, why these arrays are similar to tables, and how to declare and initialize a two-dimensional array.

  Responsibility to maintain ethical standard in department

Do managers have a responsibility to maintain an ethical standard within a department? If so, how is the expected ethical standard established? How is it documented? How is compliance measured?

  Implement a system for car dealership

Suppose that you are required to implement a system for a car dealership. The system needs to store information about each customer. This includes the customer's ID number, name, address and contact number.

  Explaining role-computer forensic investigator for law firm

You are the computer forensic investigator for a law firm. The firm acquired a new client, a young woman who was fired from her job for inappropriate files discovered on her computer

  Determine the number of comparisons

Determine the number of comparisons (as a function of n and m) that are performed in merging two ordered files a and b of sizes n and m, respectively, by the merge method presented in the lecture.

  Express the angle with respect to the tangential velocity

Express the angle with respect to the tangential velocity vector (ie, +90° points radially out). (Points : 5) A) 10.9 m/s2 at -75° B) 10.9 m/s2 at +75° C) 37.9 m/s2 at -75° D) 37.9 m/s2 at +75°

  Find out winner in card game

When there is tie, nobody loses. If first two cards total 8 or 9, hand is called a "natural" and it wins automatically, unless both hands have equal value "naturals", in which case it's a tie.

  A local department store hires you to write

A local department store hires you to write an automated checkout program to expedite customers in a hurry. The checkout line can only accept five items for any one purchase. Design a program that asks for the price of each item, and then displays..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd