Skip to content

Instantly share code, notes, and snippets.

@epcnt19
Created September 5, 2016 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcnt19/cc71f59a205e0a9187d62c28e3689bba to your computer and use it in GitHub Desktop.
Save epcnt19/cc71f59a205e0a9187d62c28e3689bba to your computer and use it in GitHub Desktop.
#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