SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import urllib
  2. import urllib2
  3.  
  4. from BeautifulSoup import BeautifulSoup
  5.  
  6. from memberrewards.lib.api import get_date
  7. from memberrewards.lib.api.aggregators.ls.api import LinkshareAPI
  8.  
  9. from rewards.aggregators.external import ExternalAffiliateProperties, ImageProperty
  10.  
  11. class LinkshareExternalAffiliateProperties(ExternalAffiliateProperties):
  12.  
  13.     __sources__ = dict(
  14.         aggregator_affiliate_id=None, # Loaded on __init__
  15.         aggregator_affiliate_name='scrape',
  16.         description='scrape',
  17.         rollover='scrape',
  18.         active='scrape',
  19.         website_name='scrape',
  20.         green=None,
  21.         days_to_return='scrape',
  22.         is_select_goods_only='scrape',
  23.         has_non_commissionable_goods='scrape',
  24.         offer='scrape',
  25.         images='api_images',
  26.         categories='scrape',
  27.     )
  28.  
  29.     def __init__(self, aggregator_affiliate_id, account_username, account_password, api_token):
  30.         assert self is not None, 'Self is None'
  31.         assert LinkshareExternalAffiliateProperties is not None, 'LinkshareExternalAffiliateProperties is None'
  32.         super(LinkshareExternalAffiliateProperties, self).__init__(aggregator_affiliate_id)
  33.         self.account_username = account_username
  34.         self.account_password = account_password
  35.         self.api_token = api_token
  36.  
  37.  
  38. # CONFIG: django, gunicorn, nginx.  Works under straight django, adding gunicorn (with 3 worker processes) raises the assertion `assert LinkshareExternalAffiliateProperties is not None`
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top