Package scrapper.fileCreator
Class MakeFile
java.lang.Object
scrapper.fileCreator.MakeFile
Fetches data from given doc (link).
Without Formatter.java, builds raw data (useful for debugging).
Process:
Call constructor (load file to write to, use external filewriter).
Use setPrasedPage to set link to fetch data from
Call scrap to grab values
Scrap calls Store internally and finally writes to file.
- See Also:
-
Constructor Summary
ConstructorDescriptionMakeFile
(File file, FileWriter fileWriter) After creating this object, you must set the doc (setParsedPage) -
Method Summary
Modifier and TypeMethodDescriptionvoid
scrap()
This function should be called when ready to run all the methods inside this class (so after setters are made).void
setParsedPage
(org.jsoup.nodes.Document parsedPage) Sets the current page to parse.
-
Constructor Details
-
MakeFile
After creating this object, you must set the doc (setParsedPage)- Parameters:
file
- File to store into.
-
-
Method Details
-
scrap
This function should be called when ready to run all the methods inside this class (so after setters are made). Helps create TableValues and calls Store();- Throws:
IOException
-
setParsedPage
public void setParsedPage(org.jsoup.nodes.Document parsedPage) Sets the current page to parse. Call this method each time you want to scrap a page.- Parameters:
parsedPage
- Page to parse
-