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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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