a guest Oct 23rd, 2017 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import urllib
- import urllib2
- from BeautifulSoup import BeautifulSoup
- from memberrewards.lib.api import get_date
- from memberrewards.lib.api.aggregators.ls.api import LinkshareAPI
- from rewards.aggregators.external import ExternalAffiliateProperties, ImageProperty
- class LinkshareExternalAffiliateProperties(ExternalAffiliateProperties):
- __sources__ = dict(
- aggregator_affiliate_id=None, # Loaded on __init__
- def __init__(self, aggregator_affiliate_id, account_username, account_password, api_token):
- assert self is not None, 'Self is None'
- assert LinkshareExternalAffiliateProperties is not None, 'LinkshareExternalAffiliateProperties is None'
- super(LinkshareExternalAffiliateProperties, self).__init__(aggregator_affiliate_id)
- self.account_username = account_username
- self.account_password = account_password
- self.api_token = api_token
- # 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