Skip to content

Instantly share code, notes, and snippets.

@onilton
Created February 3, 2016 02:15
Show Gist options
  • Save onilton/1ceda79dc794469da66a to your computer and use it in GitHub Desktop.
Save onilton/1ceda79dc794469da66a to your computer and use it in GitHub Desktop.
A one-liner for crawling fotolog in scala
import sys.process._
(0 to 510 by 30).flatMap(p => "(http://sp6.fotolog.com[^\"]+)".r.findAllIn(s"curl -s http://www.fotolog.com/_tixa14/mosaic/$p/" !!))
.map(_.replaceAll("_t.jpg", "_f.jpg"))
.foreach(u => s"wget $u" !!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment