How to search this newsgroup by a python script.

Grant Edwards invalid at invalid
Thu Jul 16 10:05:22 EDT 2009


On 2009-07-16, Chris Rebert <clp2 at rebertia.com> wrote:
> On Thu, Jul 16, 2009 at 2:12 AM, Helmut
> Jarausch<jarausch at igpm.rwth-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!

The underpants gnomes would be proud.

-- 
Grant Edwards                   grante             Yow! I'm encased in the
                                  at               lining of a pure pork
                               visi.com            sausage!!



More information about the Python-list mailing list