Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#! /usr/bin/env casperjs
# ./ '趣味はマリンスポーツです'
casper = do (require 'casper').create
casper.start '', ->
href = @evaluate ->
links = (document.querySelectorAll '.list_title')
links[Math.floor (do Math.random * links.length)].href href
casper.then ->
@echo @getTitle()
casper.fill '#form',
u: casper.cli.args[0]
@click '#form input[type="submit"]'
casper.then ->
result = @evaluate ->
document.querySelector('#forcopy textarea').value
@echo result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.