basterache3
Member
- Joined
- Jul 11, 2007
- Sythe Gold
- 0
- Messages
- 86
I have a java program I wrote to scrape a certain set of webpages.
For example, I have a list of numerical IDs that need to be scraped. The base url is all the same.
for example here are very simplified methods
Right now My program will scrape one page, finish, then scrape the next page, finish, and on and on
It only will scrape one page at once.
I want to change it so I can scrape 5 or 10 pages at once
any suggestions?
For example, I have a list of numerical IDs that need to be scraped. The base url is all the same.
for example here are very simplified methods
Code:
public void prgm(){
ArrayList<String> scrapedData = new ArrayList<String>();
for(int i=0; i=100; i++){
scrapedData.add(scrapePage(i));
}
}
public String scrapePage(int id){
//// do work here
///return a string
return "abc";
}
Right now My program will scrape one page, finish, then scrape the next page, finish, and on and on
It only will scrape one page at once.
I want to change it so I can scrape 5 or 10 pages at once
any suggestions?

