Am Donnerstag, 7. Juli 2016 16:56:48 UTC+2 schrieb Peter Otten:
> Thomas Kaufmann wrote:
>
> > Am Donnerstag, 7. Juli 2016 16:05:14 UTC+2 schrieb Thomas Kaufmann:
> >> Hi,
> >>
> >> I have a little scrapy-script: scrapy gets the links from a webpage; this
> >> works fine. Then I want to write the
Am Donnerstag, 7. Juli 2016 16:52:12 UTC+2 schrieb Chris Angelico:
> On Fri, Jul 8, 2016 at 12:42 AM, Thomas Kaufmann wrote:
> > I changed my code in the way you suggested. There is no effect in the db. I
> > start this script on the commandline with:
> >
> > tk@Hamlet:~/myscrapy/tutorial/tutoria
Peter Otten wrote:
More errors than words :(
>> There is no effect in the db.
>
> Did you replace the line
>
> conn.commit
>
> with
>
> con.commit()
Of course the updated code should read
conn.commit()
> ? If not, can you provide the updated code?
and that should have been "If yes, ...",
Thomas Kaufmann wrote:
> Am Donnerstag, 7. Juli 2016 16:05:14 UTC+2 schrieb Thomas Kaufmann:
>> Hi,
>>
>> I have a little scrapy-script: scrapy gets the links from a webpage; this
>> works fine. Then I want to write these links in a sqlite3-table. There is
>> no error-note. But in the database ar
On Fri, Jul 8, 2016 at 12:42 AM, Thomas Kaufmann wrote:
> I changed my code in the way you suggested. There is no effect in the db. I
> start this script on the commandline with:
>
> tk@Hamlet:~/myscrapy/tutorial/tutorial/spiders$ scrapy crawl webbot
You have some print calls in your code. Are t
Am Donnerstag, 7. Juli 2016 16:05:14 UTC+2 schrieb Thomas Kaufmann:
> Hi,
>
> I have a little scrapy-script: scrapy gets the links from a webpage; this
> works fine. Then I want to write these links in a sqlite3-table. There is no
> error-note. But in the database are not any records. What is th
On Fri, Jul 8, 2016 at 12:04 AM, wrote:
> 34 sql = "INSERT INTO Frisch VALUES(" + unicode(counter) +
> ", " + "'" + el.strip() + "');"
Don't ever do this. Instead, use parameterized queries:
cur.execute("INSERT INTO Frisch VALUES (?, ?)", (counter, el.strip()))
> 38
Hi,
I have a little scrapy-script: scrapy gets the links from a webpage; this works
fine. Then I want to write these links in a sqlite3-table. There is no
error-note. But in the database are not any records. What is the problem here?
My code:
# -*- coding: utf-8 -*-
2
3 import scrapy
4