Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use different site for checking ip #30

Merged
merged 1 commit into from
Oct 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import fs2._
sealed class WhatsMyIpChecker(browsers: Seq[Browser[Task]])(implicit S: Strategy)
extends Crawler[Task, String](browsers) {
override protected def onDocument(document: Document): Stream[Task, Yield[String]] = {
document.root.select("span#ip").headOption match {
case Some(x) => Stream.emit(YieldData(x.text))
document.root.select("h1.ip > input").headOption.flatMap(_.attr("value")) match {
case Some(x) => Stream.emit(YieldData(x))
case None => Stream.empty
}
}
Expand All @@ -23,7 +23,7 @@ class JsoupProxyPickingTest extends ScrawlerTest {

implicit val strategy: Strategy = Strategy.fromFixedDaemonPool(8)

val whatsmyip = "http://www.whatsmyip.org"
val whatsmyip = "http://whatsmyip.net/"

// from http://proxylist.hidemyass.com
val proxies: Seq[ProxySettings] = Seq(
Expand Down