Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#coding:utf-8
import sys
from urllib import urlopen
from bs4 import BeautifulSoup
if __name__=='__main__':
argvs = sys.argv
"""
if len(argvs) != 2:
print "usage: #python %s url"%argvs[0]
quit()
"""
url = argvs[1]
html= urlopen(url)
obj = BeautifulSoup(html.read(),"html.parser")
print obj.title.string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment