Beginner: Portable Python, BeautifulSoup & ScrapeNFeed

Brian Brian.Mingus at
Wed Apr 15 09:09:19 CEST 2009

On Ubuntu:

sudo apt-get install python-pyrss2gen python-beautifulsoup # download

Not sure what's wrong with this but it's most of the code you'll need:
from urllib import urlopen
from BeautifulSoup import BeautifulSoup
from PyRSS2Gen import RSSItem, Guid
import ScrapeNFeed
import re

job_html = urlopen(url).read()
job_soup = BeautifulSoup(job_html)
jobs = job_soup.findAll('strong', text=re.compile('.*RESEARCH.*'))

class JobFeed(ScrapeNFeed.ScrapedFeed):
    def HTML2RSS(self, headers, body):
        items = [RSSItem(title=job,
                 for job in jobs]



On Tue, Apr 14, 2009 at 4:17 PM, Joe Larson <joe at> wrote:

> Hello list!
> I am a Python Beginner. I thought a good beginning project would be to use
> the Portable Python environment with
> Beautiful Soup and Scrape
> 'N' Feed to create and RSS
> feed of this page - ideally
> filtering just for positions with the string 'Research Analyst'.
> In my day job I work on the Windows OS (hence the Portable Python) - at
> home I use Ubuntu but also carry Portable Ubuntu as well.
> I just wanted to shoot this to the list - see if anyone had any suggestions
> or tips. I'm reading O'Reilly's Learning Python and The Python Tutorial, but
> it's still very challenging as this is my first programming language. Thanks
> all! Sincerely ~ joelar
> --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list