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

  Truth table validity of demorgan-s theorem for variables

Find out by means of truth table validity of DeMorgan's theorem for three variables: (ABC)' = A' + B' + C'. Simplify given expressions by using Boolean algebra.

  What size of packet will result in the last bit

Given a transmission speed of T bits/second, a packet size of B bytes, a propagation speed of P m/s and a cable length of L meters, what size of packet will result in the last bit being transmitted just as the first bit of the packet arrives at th..

  Optional functionality: allow the user to print the report

A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock

  What does the top box, middle box and last box contain

There are three boxes in a Unified Mark-Up Language class diagram. What does the top box, middle box, and last box contain?

  In what ways does it planning help managers exercise

In what ways does IT planning help managers exercise control in a situation? Does IT impact the truck driver of a company who delivers supplies to its customer?

  Information security problem or issue in organisation

Illustrate how the work breakdown structure would identify and plan an information security problem or issue in the organisation.

  Use newtons method to calculate

Now apply newton's method to find the root of x^3-3x^2+3x-1=0. Count the number of iterations required to converge upto 10 decimal point accuracy.

  Why analyst needs to understand how people think

Describe why an analyst needs to understand how people think, how they learn, how they react to change, how they communicate, and how they work.

  Display an appropriate error message

User Radio Buttons with a shared event procedure and a Select Case to determine which text box (State name or abbreviation) should have the focus and which should be set to Readonly.

  Your first program will require the use of static methods

Your first program will require the use of static methods and for loops

  Write method determines pair integers whether multiple first

Write method multiple that determines, for a pair of integers, whether the second integer is a multiple of the first. The method should take two integer arguments and return true if the second is a multiple of the first and false otherwise.

  Write a program that will define the f string manipulation

1.) Write a program that will define the following string manipulation functions. Each is analogous to thecorresponding C++ string function.

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