Skip to content

Instantly share code, notes, and snippets.

uni8inu uni8inu

Block or report user

Report or block uni8inu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@uni8inu
uni8inu / bs4_traverse.py
Last active Dec 27, 2016
BeautifulSoup4 TreeNode traverse and fix NavigableString
View bs4_traverse.py
from bs4 import BeautifulSoup as bs
from bs4.element import Tag, NavigableString, Comment
# refer to / https://www.crummy.com/software/BeautifulSoup/bs4/doc/#navigablestring
ignore_list = ["", " ", "\n"]
def traverse(node):
if isinstance(node, Tag):
@uni8inu
uni8inu / narou_query.py
Created Dec 7, 2016
なろうディベロッパー Python3版サンプルコード
View narou_query.py
import json
from urllib.request import urlopen
import gzip
#sample get
#refer to: http://dev.syosetu.com/man/sample01/
#APIのURL(パラメーターを指定してください)
url = "http://api.syosetu.com/novelapi/api/?out=json&lim=100&gzip=5"
@uni8inu
uni8inu / gist.py
Last active Dec 7, 2016
test gist
View gist.py
print("hello world")
print("hello2") # fix!
You can’t perform that action at this time.