projects
/
arachne.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remember title when parsing URL.
[arachne.git]
/
src
/
net
/
pterodactylus
/
arachne
/
core
/
URLFetcher.java
diff --git
a/src/net/pterodactylus/arachne/core/URLFetcher.java
b/src/net/pterodactylus/arachne/core/URLFetcher.java
index
ddfbddd
..
d2ce831
100644
(file)
--- a/
src/net/pterodactylus/arachne/core/URLFetcher.java
+++ b/
src/net/pterodactylus/arachne/core/URLFetcher.java
@@
-40,6
+40,9
@@
class URLFetcher implements Runnable, ParserListener {
/** The collected URLs. */
private final List<Page> collectedPages = new ArrayList<Page>();
/** The collected URLs. */
private final List<Page> collectedPages = new ArrayList<Page>();
+ /** The title of the URL. */
+ private String title;
+
/**
* Creates a new fetcher for the given URL.
*
/**
* Creates a new fetcher for the given URL.
*
@@
-60,6
+63,15
@@
class URLFetcher implements Runnable, ParserListener {
//
/**
//
/**
+ * Returns the title of the fetched URL.
+ *
+ * @return The fetched URL’s title
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
* Returns the pages collected while parsing this URL.
*
* @return The collected pages
* Returns the pages collected while parsing this URL.
*
* @return The collected pages
@@
-132,6
+144,7
@@
class URLFetcher implements Runnable, ParserListener {
* {@inheritDoc}
*/
public void parsedTitle(InputStream inputStream, String title) {
* {@inheritDoc}
*/
public void parsedTitle(InputStream inputStream, String title) {
+ this.title = title;
}
}
}
}