await page.click('input[name="gender"]:nth-of-type(2)');
python 写経するサイトのリスト
python string
写経します
# -*- coding: utf-8 -*- print 'tacchini-blog' print "tacchini-blog" print """tacchini-blog1 tacchini-blog2 tacchini-blog3""" print """ tacchini-blog-a tacchini-blog-b tacchini-blog-c """ print 'tacchini' + '-' + 'blog' test_str = 'tacchini' test_str += '-' test_str += 'blog' print test_str print 'tacchini-' * 3 print str(100) + '円' print 'tacchini-blog'.replace('-', '#') print 'tacchini-blog'.split('-') print '108'.rjust(10, '0') print '108'.rjust(10, ' ') print '108'.ljust(10, '0') print '108'.ljust(10, '+') print '108'.zfill(10) print '108'.zfill(3) print '108'.zfill(-10) print 'tacchini-blog'.startswith('tacchini-blog') print 'tacchini-blog'.startswith('blog') print 'c' in 'tacchini-blog' print 'd' in 'tacchini-blog' print 'Tacchini-Blog'.upper() print 'Tacchini-Blog'.lower() print '-' * 30 print ' tacchini-blog' print ' tacchini-blog'.lstrip() print 'tacchini-blog'.lstrip('tacchini') print '-' * 30 print 'tacchini-blog.com /' print 'tacchini-blog.com '.rstrip() + '/' print 'tacchini-blog.com'.rstrip('com')
beautifulsoup
<title> タグを取得
# -*- coding:utf-8 -*- import urllib2 from bs4 import BeautifulSoup html = urllib2.urlopen("http://kazuyan.hatenablog.com/entry/building-a-large-scale-design-system") soup = BeautifulSoup(html) print soup.title.string
実行結果
大規模デザインシステムを作る:いかにしてアメリカ連邦政府のデザインシステムを作り上げたか - カタパルト式!スープレックス!!
参考
__init__.py
init.py がないと import に失敗する
これは知らんかった
ImportError: No module named xxx
http://samurait.hatenablog.com/entry/init.py%E3%81%AE%E5%BD%B9%E5%89%B2