[BangPypers] Newspaper in Python

Nimish Dalal nimish.s.dalal at gmail.com
Fri Apr 24 08:46:03 CEST 2015


Hi, I am new to python and need help with newspaper.
I am using this module as I find it easier to extract the urls from the
website.

Here's my code:

import newspaper
Sc_paper = newspaper.build(u'http://scroll.in/')
for article in Sc_paper.articles:
    print(article.url)
http://scroll.in/...
http://scroll.in/...

Instead of  print I want the urls to export as a .txt file or .csv file.

Thanks in advance.


-- 
Nimish S. Dalal
Cell: 9819670499
Facebook: http://www.facebook.com/nimish.s.dalal
Twitter: http://twitter.com/nimishdalal <http://twitter.com/nimishsdalal>
Linkedin:http://in.linkedin.com/in/nimishsdll
Url: http://www.nimishdalal.me

Our generation has had no Great Depression, no Great War. Our war is a
spiritual war. Our great depression is our lives.


More information about the BangPypers mailing list