• Error message

    From Charles Pierson@1:106/127 to All on Fri Feb 5 14:35:26 2021
    I'm trying to make an RSS scraper to pull articles from RSS feeds and export them to text files, to be used either in my BBS bulletins or message areas

    I found a web page that supposedly does exactly this, however using the code and testing I get the Folliwing error:


    python scraping.py
    File "scraping.py", line 5
    def
    hackernews_rss('https://news.ycombinator.com/rss'):
    ^
    SyntaxError: invalid
    syntax



    The code is:

    # scraping function
    def hackernews_rss('https://news.ycombinator.com/rss'):
    try:
    r = requests.get()
    return print('The scraping job succeeded: ', r.status_code)
    except Exception as e:
    print('The scraping job failed. See exception: ')
    print(e)print('Starting scraping')
    hackernews_rss()
    print('Finished scraping')


    Any idea what I flubbed?

    Thanks

    --- Mystic BBS v1.12 A46 2020/08/26 (Raspberry Pi/32)
    * Origin: theoasisbbs.ddns.net:1357 (1:106/127)