コード例 #1
0
ファイル: demo.py プロジェクト: mkai/metadata_parser
    print c.get_metadata('title')

    print "\n-------------------------------------------------------\n"
    print a.metadata
    print "\n-------------------------------------------------------\n"
    print b.metadata
    print "\n-------------------------------------------------------\n"
    print c.metadata
    print "\n-------------------------------------------------------\n"

    print c.get_metadata('title')
    print c.get_metadata('canonical')
    print c.get_metadata('url')
    print c.absolute_url(c.get_metadata('canonical'))
    print c.absolute_url(c.get_metadata('url'))
    print c.get_discrete_url()

if 0:
    a= MetadataParser(url='http://liqr.co/rsvpnewyork')
    print "title:"
    print a.get_metadata('title')
    print "canonical:"
    print a.get_metadata('canonical')
    print "url:"
    print a.get_metadata('url')
    print "absolute_url-canonical:"
    print a.absolute_url(a.get_metadata('canonical'))
    print "absolute_url-url:"
    print a.absolute_url(a.get_metadata('url'))
    print "get_discrete_url:"
    print a.get_discrete_url()
コード例 #2
0
ファイル: demo.py プロジェクト: naushadzaman/metadata_parser
    print(c.get_metadata('title'))

    print("\n-------------------------------------------------------\n")
    print(a.metadata)
    print("\n-------------------------------------------------------\n")
    print(b.metadata)
    print("\n-------------------------------------------------------\n")
    print(c.metadata)
    print("\n-------------------------------------------------------\n")

    print(c.get_metadata('title'))
    print(c.get_metadata('canonical'))
    print(c.get_metadata('url'))
    print(c.absolute_url(c.get_metadata('canonical')))
    print(c.absolute_url(c.get_metadata('url')))
    print(c.get_discrete_url())

if 0:
    a = MetadataParser(url='http://liqr.co/rsvpnewyork')
    print("title:")
    print(a.get_metadata('title'))
    print("canonical:")
    print(a.get_metadata('canonical'))
    print("url:")
    print(a.get_metadata('url'))
    print("absolute_url-canonical:")
    print(a.absolute_url(a.get_metadata('canonical')))
    print("absolute_url-url:")
    print(a.absolute_url(a.get_metadata('url')))
    print("get_discrete_url:")
    print(a.get_discrete_url())
コード例 #3
0
ファイル: demo.py プロジェクト: nkhuyu/metadata_parser
    print(c.get_metadata('title'))

    print("\n-------------------------------------------------------\n")
    print(a.metadata)
    print("\n-------------------------------------------------------\n")
    print(b.metadata)
    print("\n-------------------------------------------------------\n")
    print(c.metadata)
    print("\n-------------------------------------------------------\n")

    print(c.get_metadata('title'))
    print(c.get_metadata('canonical'))
    print(c.get_metadata('url'))
    print(c.absolute_url(c.get_metadata('canonical')))
    print(c.absolute_url(c.get_metadata('url')))
    print(c.get_discrete_url())

if 0:
    a = MetadataParser(url='http://liqr.co/rsvpnewyork')
    print("title:")
    print(a.get_metadata('title'))
    print("canonical:")
    print(a.get_metadata('canonical'))
    print("url:")
    print(a.get_metadata('url'))
    print("absolute_url-canonical:")
    print(a.absolute_url(a.get_metadata('canonical')))
    print("absolute_url-url:")
    print(a.absolute_url(a.get_metadata('url')))
    print("get_discrete_url:")
    print(a.get_discrete_url())