can I import local data?

57 views
Skip to first unread message

Kat

unread,
May 10, 2012, 1:03:47 PM5/10/12
to ScraperWiki
HI,
Maybe this is super ignorant, but can I import local data from my
computer in scraperwiki?

I"m trying:


import scraperwiki
import csv
import os

os.chdir('/Users/myname/Documents/folder/groupon')
data=csv.reader(open('/Users/myname/Documents/folder/divisions.csv',
'r'))
scraperwiki.sqlite.save(unique_keys=["a"], data=data))


But it can't find my local folders.

Thanks,
Kat

Jeremy Sher

unread,
May 10, 2012, 1:12:08 PM5/10/12
to scrap...@googlegroups.com
Can you upload that to a web server somewhere? I think that would be your best option.
--
Jeremy Sher

Páll Hilmarsson

unread,
May 10, 2012, 1:37:14 PM5/10/12
to scrap...@googlegroups.com
Scraperwiki will not have access to your local files, unless you run a
webserver on your computer.

This isn´t actually that hard to do with programs like PageKite
(http://pagekite.net/) that allow you to have a (temporary if you
like) webserver on your computer that servers files, without worrying
about domain names, routers, ports or DNS.

Even easier would be to put your csv files in a public dropbox
(www.dropbox.com) folder. Files in the public dropbox folder have a
url that you can use to access it. Here is a tutorial on that:
https://www.dropbox.com/help/16

pallih
--
pal...@kaninka.net
http://gogn.in
http://twitter.com/pallih
http://is.linkedin.com/in/pallih

My email load: http://courteous.ly/KbEbzo
Reply all
Reply to author
Forward
0 new messages