FlyerTalk Forums - View Single Post - Avios Finder 1.0 (for UK and US members)
View Single Post
Old Jan 19, 2012 | 7:43 am
  #19  
meester69
All eyes on you!
15 Years on Site
 
Join Date: Jul 2008
Programs: I am a lowly ant
Posts: 1,756
Originally Posted by PanGalactic
I tried that, but the links didn't work for some reason, something to do with permissions

I am waiting for a whizz-kid I know to have a look at it and help me make some improvements, but he is a bit busy at the moment.

IANRAP (I am not really a programmer)

The plan is to display the link to BA or Avios.com or both based on which site the retailer is available and show you the earn rates too incase one is better than the other. At the moment the 2 lists are merged so you should check both ba.com and avios.com to see which is best before making a purchase.
Are they not both the same?

I would like to make the alert a bit more obvious, ie: open a popup or play a sound, and also put an option to silence it if you are already clicked through via an eStore.
Maybe make the whole tab red?

Please feel free to make any other suggestions and we will see what can be done.
I think it's quite a lot of maintenace to look after this.

What I would do is this:

https://www.aviosestore.co.uk/allstores/81301/

is a very handy complete listing of the Avios e-stores.

What you need to do is parse this with a regular expression. From the code:

<!-- store line -->
<div class="store-line" style="background-color:#fdfdf9;" onmouseover="this.style.backgroundColor='#eeeeee'" onmouseout="this.style.backgroundColor='#fdfdf9'">
<div class="img"><a href="/info/81301/4049/247-blinds/afsrc=1"><img src="https://images.ntwk45.com/images/_blinds_88x31_2.gif" alt="247 Blinds" border=0 /><em></em></a></div>
<div class="reb"><a href="/info/81301/4049/247-blinds/afsrc=1">8 Avios for £1</a></div>
<div class="desc">Largest range of top quality, made to measure blinds</div>

<div style="clear:both;"></div>
</div>
<!-- //store line -->

Very roughly, you want a multi-line regular expression that looks something like this (a lot of the special characters here will need to be escaped, and this is a sort of generic regular expression, not one that will work without tidying up)

<!-- store line -->.*/([^/]+)/afsrc=1">([0-9]+ Avios[^<]+)<!-- //store line -->


This is intended to create two capture groups, the first is ([^/]+) is the store '247-blinds' in the example above, the second ([0-9]+ Avios[^<]+) is the earning rate, e.g., '8 Avios per £1', or '2000 Avios'

This can be used to automatically spider the cashback rate.

I had a look at the cashback guardian code, it uses this feed:

http://www.cashbackguide.org/downloa...=siteoffers.db

Basically the plugin downloads the feed from a remote URL and checks every 24 hours for updates. To take a line from that feed:

9,1,-1944528489,11%,-1531015890

9 is just a consecutive index, 1 is not used, and the negative numbers are hashes of the domain. Not really necessary to do it that way,
9,1,argos.co.uk,11%,-1531015890

would work just as well.

Anyway, the remote feed is the way to go, if you are so inclined.
meester69 is offline