; for article in Sc_paper.articles:
> fh.write(article)
>
>
>
> -Mandar
>
> On Fri, Apr 24, 2015 at 2:18 PM, Prince Sharma
> wrote:
>
> > No problem, however i forgot to close the file handle. You can start
> > solving problem from there ;)
> >
> >
ple who spared your time to resolve the issue.
Someday I think I will be intelligent enuf to share my knowledge and
resolve noob's problems. Haha..
> On Apr 24, 2015 1:20 PM, "Nimish Dalal" wrote:
>
> > On Fri, Apr 24, 2015 at 12:29 PM, Prince Sharma
> > wr
)
> outfile.write(article.url) # Write to file
> outfile.write('\n')
>
> outfile.close() # Close the file handle
>
> This should work.
>
> Wow! That actually worked for me. Thank you very much. I appreciate that.
> On Fri, Apr 24, 2015 at 1:23 PM, Nim
On Fri, Apr 24, 2015 at 12:48 PM, sshabin...@gmail.com wrote:
> -OR-
>
> import newspaper
>
> articles = [ ]
> Sc_paper = newspaper.build(u'http://scroll.in/')
>
> for article in Sc_paper.articles:
> articles.append(article)
>
> with open("filename", "w") as f:
> f.write( "\n".join(articl
On Fri, Apr 24, 2015 at 12:29 PM, Prince Sharma
wrote:
> By export you mean you want to create a text file for every URL?
>
Hey Prince,
I want all the urls to be compiled in a text file.
Hi, I am new to python and need help with newspaper.
> I am using this module as I find it easier to extract
te(article) # Write to file
outfile.write('\n')
outfile.close()
TypeError: expected a character buffer object.
> On Fri, Apr 24, 2015 at 12:16 PM, Nimish Dalal
> wrote:
>
> > Hi, I am new to python and need help with newspaper.
> > I am using this module a
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/...
htt
Excellent guys.
This is definitely going to help n00bs like me who recently got started
learning python.
On Fri, Apr 3, 2015 at 12:20 PM, Dinakar K wrote:
> Hi Guys,
>
> We built a useful page about simple and profound python tricks
> and got a very good response from reddit
>
> here is the link
> >>>slug = quote('/profile/guido van')
> >>>slug
> '/profile/guido%20van'
> >>>unquote(slug)
> '/profile/guido van'
> ```
>
>
>
> On Fri, Mar 20, 2015 at 10:56 PM, Gora Mohanty wrote:
&
I installed Anaconda version 2.1.0 python 3.4.1
On Fri, Mar 20, 2015 at 10:09 PM, Nitin Kumar wrote:
> Which version of Python are you using. Older version (<2.6) of Python
> urllib didn't had unquote.
>
> Nitin K
>
> On Fri, Mar 20, 2015 at 8:43 PM, Nimish Dalal
>
Guys, I am new to python.
I am using ipython notebook on windows 7 platform.
I get an error when I mention "from urllib import unquote"
ImportError: cannot import name 'unquote'
Thank you in advance.
___
BangPypers mailing list
BangPypers@python.org
htt
11 matches
Mail list logo