How to search this newsgroup by a python script.

Discussion in 'Python' started by Helmut Jarausch, Jul 16, 2009.

  1. Hi,

    I haven't found anything with Google's group search, so let me
    ask it (again?).

    How can I search this newsgroup from within a Python script.
    (Perhaps by searching Google Groups or Gmane by some Python code.)

    Many thanks for a hint,
    Helmut.

    --
    Helmut Jarausch

    Lehrstuhl fuer Numerische Mathematik
    RWTH - Aachen University
    D 52056 Aachen, Germany
    Helmut Jarausch, Jul 16, 2009
    #1
    1. Advertising

  2. Helmut Jarausch

    Chris Rebert Guest

    On Thu, Jul 16, 2009 at 2:12 AM, Helmut
    Jarausch<-aachen.de> wrote:
    > Hi,
    >
    > I haven't found anything with Google's group search, so let me
    > ask it (again?).
    >
    > How can I search this newsgroup from within a Python script.
    > (Perhaps by searching Google Groups or Gmane by some Python code.)


    1. Generate URL of the form:
    http://search.gmane.org/?query=foo&group=gmane.comp.python.general
    where "foo" is the search terms, with proper URL escaping applied.
    2. Fetch URL using urllib - http://docs.python.org/library/urllib.html
    3. Parse resulting HTML page (e.g. using BeautifulSoup)
    4. Extract desired information from search results using the parse tree.
    5. ???
    6. Profit!

    Cheers,
    Chris
    --
    http://blog.rebertia.com
    Chris Rebert, Jul 16, 2009
    #2
    1. Advertising

  3. Helmut Jarausch

    Tim Golden Guest

    Chris Rebert wrote:
    > On Thu, Jul 16, 2009 at 2:12 AM, Helmut
    > Jarausch<-aachen.de> wrote:
    >> Hi,
    >>
    >> I haven't found anything with Google's group search, so let me
    >> ask it (again?).
    >>
    >> How can I search this newsgroup from within a Python script.
    >> (Perhaps by searching Google Groups or Gmane by some Python code.)

    >
    > 1. Generate URL of the form:
    > http://search.gmane.org/?query=foo&group=gmane.comp.python.general
    > where "foo" is the search terms, with proper URL escaping applied.
    > 2. Fetch URL using urllib - http://docs.python.org/library/urllib.html
    > 3. Parse resulting HTML page (e.g. using BeautifulSoup)
    > 4. Extract desired information from search results using the parse tree.
    > 5. ???
    > 6. Profit!


    Alternatively, you could do something with the mailing list archive:

    http://mail.python.org/pipermail/python-list/

    The .gz files are gzipped mbox format so can be dropped into, eg,
    Thunderbird for offline browsing, or searched with the email
    package from the stdlib.

    TJG
    Tim Golden, Jul 16, 2009
    #3
    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. Harald Stowasser
    Replies:
    4
    Views:
    679
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Jun 27, 2003
  2. Peter Hansen

    newsgroup for embeded/extend python ?

    Peter Hansen, Aug 22, 2004, in forum: Python
    Replies:
    1
    Views:
    276
    skull
    Aug 23, 2004
  3. Christian Helmbold
    Replies:
    0
    Views:
    277
    Christian Helmbold
    Mar 9, 2005
  4. jgm
    Replies:
    0
    Views:
    279
  5. Abby Lee
    Replies:
    5
    Views:
    400
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page