Exemplo n.º 1
0
 def testGetTargetMediaplex(self):
     src = 'http://adfarm.mediaplex.com/ad/ck/15368-110724-36269-43?CJAID=801842&CJPID=1777643&ttp=100&rfr=123'
     target = 'https://promotions.betfair.com/value-uk-football-dual-aff-t?CID=&PLA=153681107243626943&ttp=100&rfr=123&mpch=ads'
     domain = 'promotions.betfair.com'
     url = get_target(src)
     self.assertEqual(url,target)
     self.assertEqual(strip_www(url_to_domain(url)), domain)
Exemplo n.º 2
0
 def testGetTargetTCB(self):
     src = 'https://www.topcashback.co.uk/earncashback.aspx?mpurl=currys&continue=1'
     target = 'http://www.currys.co.uk/gbuk/index.html?srcid=369&xtor=AL-1&cmpid=aff~TopCashBack~'
     domain = 'currys.co.uk'
     url = get_target(src)
     self.assertEqual(url,target)
     self.assertEqual(strip_www(url_to_domain(url)), domain)