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
def parse_schedule_page(content): | |
doc = lxml.html.document_fromstring(content) | |
rows = doc.xpath('//table[@class="reqform"]/tr/td') | |
print "Rows:", len(rows) | |
description = '' | |
if len(rows): | |
description = " ".join([line.text_content().strip() for line in rows[0].xpath('.//h3')]) |
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
# n) Something text or | |
# n) Right text* | |
match = re.match(r'^\w\)\s+(.[^\*]*)(\*?)$', line, re.UNICODE) | |
if match and len(match.groups()): | |
answer = dict(zip(['text','right'], [x for x in match.groups() if len(x)])) |
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
var wd = require('wd'), | |
assert = require('assert'), | |
colors = require('colors'), | |
browser = wd.promiseRemote(); | |
browser.on('status', function(info) { | |
console.log(info.cyan); | |
}); | |
browser.on('command', function(meth, path, data) { |
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
>>> import sqlite3 | |
>>> sqlite3.version | |
'2.6.0' | |
>>> sqlite3.sqlite_version | |
'3.7.17' |
NewerOlder