getting title, desciption for webpages

Discussion in 'HTML' started by रवींदर ठाकà¥à¤° (ravinder thakur, Jun 7, 2008.

  1. hello friends,


    i am trying to find some generic way of getting the title and
    description of webpages such as the one shown by google in the search
    results. is there any _easy_ method that we can use for same ? i have
    tried google apis but apparently it doesn't contain the titles/
    description of all the web pages. i will be doing this in python.


    thanks
    ravinder thakur
    रवींदर ठाकà¥à¤° (ravinder thakur, Jun 7, 2008
    #1
    1. Advertising

  2. Scripsit रवींदर ठाकà¥à¤° (ravinder thakur):

    > i am trying to find some generic way of getting the title and
    > description of webpages [...] i will be doing this in python.


    Try googling with words like
    python html parse

    The first hit I got is
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286269
    which might suit your needs.

    It's probably easier to write two good HTML parsers than to decide which
    of them is better. But for extracting the <title> element and the <meta>
    element with name="description", any good or half-good parser should do.
    Just make sure you recognize the tag and attribute names and the value
    "description" in a case-sensitive manner and do not change the case of
    anything in the title and description you extract (unless you really
    want to).

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jun 7, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. fpgawizz

    VHDL desciption of BLock RAM

    fpgawizz, Mar 28, 2005, in forum: VHDL
    Replies:
    4
    Views:
    7,072
  2. Andreas Klemt
    Replies:
    1
    Views:
    435
    Steve C. Orr, MCSD
    Aug 10, 2003
  3. Replies:
    0
    Views:
    494
  4. Replies:
    1
    Views:
    514
    David
    Apr 24, 2007
  5. soonic
    Replies:
    11
    Views:
    1,753
    soonic
    Jul 27, 2011
Loading...

Share This Page