Skip to content

Instantly share code, notes, and snippets.

@seikichi
Created July 3, 2013 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seikichi/5920463 to your computer and use it in GitHub Desktop.
Save seikichi/5920463 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Example: python3 kasi_time.py 65532
import sys
from selenium import webdriver
if len(sys.argv) != 2:
print('Usage: kasi_time.py id', file=sys.stderr)
exit(-1)
id = sys.argv[1]
url = 'http://www.kasi-time.com/item-{0}.html'.format(id)
driver = webdriver.PhantomJS()
driver.get(url)
elem = driver.find_element_by_xpath('//div[@class="mainkashi"]')
print(elem.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment