Members
Nightmare
The framework used to scrapt www.computer.org.
- Source:
terms
The list of terms to search. Every line is a term.
- Source:
Methods
readArray(filename)
Reads a file and build an array of terms from each line.
Parameters:
Name | Type | Description |
---|---|---|
filename |
The file where the terms are saved. Each line is a term. |
- Source:
Returns:
An array of the terms from the file.
searchTerms(terms, see, agent, sleep)
Search the terms a save a capture (in img directory) and the html (in html directory)
Parameters:
Name | Type | Description |
---|---|---|
terms |
An array of the terms to be search. | |
see |
Optional boolean to indicate if Nightmare has to show the process. Default is false. | |
agent |
The user agent field to send in the http hearder. Default is mozilla firefox. | |
sleep |
Milliseconds between actions made in the webpage. (Default is 1000). A major value is slowly but more probable to retrieve the webpage. |
- Source: