Created
July 3, 2013 16:56
-
-
Save seikichi/5920463 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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