from urlparse import urlparse import urllib def toGSBL(str_url, character_code) scheme, netloc, path, params, query, fragments = urlparse(unicode(str_url, character_code, 'ignore')) netloc = netloc.encode('idna') path = urllib.quote_plus(path.encode('utf-8'), '') if len(path) > 0 else '/' query = urllib.quote_plus(query.encode('utf-8'), '') if len(query) > 0 else '' return scheme + '://' + netloc
Google Safe Browsing APIは特定のURLやバイナリが安全か否かをチェックするAPI。さっと調べるときに便利なようにJupyterから使えるようにしてみた。 普通のURLを入れると何も値が出てこないので「安全でないURL」を探したのと、ヒアドキュメントにURLを埋め込むあたりに苦労の跡が。 import pycurl, io, json url = 'http://malware.testing.google.test/testing/malware/' api_key = 'your_api_key' data = ''' {{ "client": {{ "clientId": "your_client_name", "clientVersion": "0.1" }}, "threatInfo": {{ "threatTypes": ["THREAT_TYPE_UNS
Skype4Py is a Python wrapper for the Skype API. It works on Windows, Linux and Mac so your scripts will work on all these platforms without any change. Its API is very simmilar to Skype4COM, it defines an identical set of classes and 99% of their methods have the same arguments. Requirements Python 2.4 or later Skype client ctypes package if using Python older than 2.5 Download and Installation
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く