我正在使用scraperwiki在Python中运行一些代码。但是,当我运行此代码时,我收到此错误:
追踪(最近一次通话): 文件“./code/scraper”,第4行,in 来自scrapemark import scrape ImportError:没有名为scrapemark的模块
这是代码:
import scraperwiki
from scrapemark import scrape
import scraperwiki
for page in range(1,40):
URL = "https://appexchange.salesforce.com/results?pageNo="+str(page)+"&filter=a0L3000000OvSOGEA3" #Marketing
print URL
html = scraperwiki.scrape(URL)
scrape_data = scrape("""
{*
<a class="tile-title" href="{{ [mobile].[link] }}" id="{{ [mobile].[id] }}" title="{{ [mobile].[title1] }}"></a>
*}
""", html=html);
data = [{'Title':p['title1'][0], 'URL':p['link'][0], 'ID':p['id'][0], 'Format':'Managed'} for p in scrape_data['mobile']]
scraperwiki.sqlite.save(unique_keys=["URL"], data=data)
有谁能告诉我如何解决这个问题?