error importing python library in scraperwiki

752 views Asked by At

I am using scraperwiki to run some code in Python. However, when I run this code I am getting this error:

Traceback (most recent call last): File "./code/scraper", line 4, in from scrapemark import scrape ImportError: No module named scrapemark

here is the code:

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)

Can anyone tell me how to fix this?

0

There are 0 answers