amazonify è il modo più semplice per costruire legami di affiliazione di Amazon, in Python.
Installa
Per installare `` python-amazonify``, basta eseguire
`` Pip installare amazonify`` e si otterrà l'ultima versione installata
automaticamente.
Utilizzo
Usando `` amazonify`` è davvero facile. Tutto che è passarlo l'URL Amazon Faresti
piacerebbe fare in un link di affiliazione, e il tag di affiliazione di Amazon.
`` `Python
>>> Da amazonify amazonify import
>>>
>>> # Your Amazon tag affiliazione:
>>> Affiliate_tag = 'rdegges-20'
>>>
>>> # Alcuni non-affiliazione Amazon URL:
>>> URL = [
... & Nbsp; & nbsp; & nbsp; & nbsp; 'http://www.amazon.com/Canon-21-1MP-Frame-Digital-Camera/dp/B001G5ZTLS/ref=sr_1_1?ie=UTF8&qid=1337148615&sr=8-1',
... & Nbsp; & nbsp; & nbsp; & nbsp; 'Http://www.amazon.com/Transcend-Compact-Flash-Card-400X/dp/B002WE4H8I/ref=pd_bxgy_p_img_b',
... & Nbsp; & nbsp; & nbsp; & nbsp; 'Http://www.amazon.com/Canon-LP-E6-Battery-Digital-Cameras/dp/B001KELVS0/ref=pd_bxgy_e_img_b',
... & Nbsp; & nbsp; & nbsp; & nbsp; 'http://www.amazon.com/Canon-50mm-1-8-Camera-Lens/dp/B00007E7JU/ref=sr_1_1?ie=UTF8&qid=1337148688&sr=8-1',
... & Nbsp; & nbsp; & nbsp; & nbsp; 'http://www.amazon.com/Canon-70-300mm-4-5-6-Lens-Cameras/dp/B0007Y794O/ref=sr_1_3?ie=UTF8&qid=1337148688&sr=8-3',
...]
>>> Affiliate_urls = [amazonify (u, tag) per u in url]
>>> affiliate_urls
[
& Nbsp; & nbsp; & nbsp; 'Http://www.amazon.com/Canon-21-1MP-Frame-Digital-Camera/dp/B001G5ZTLS/ref=sr_1_1?tag=rdegges-20',
& Nbsp; & nbsp; & nbsp; 'http://www.amazon.com/Transcend-Compact-Flash-Card-400X/dp/B002WE4H8I/ref=pd_bxgy_p_img_b?tag=rdegges-20',
& Nbsp; & nbsp; & nbsp; 'http://www.amazon.com/Canon-LP-E6-Battery-Digital-Cameras/dp/B001KELVS0/ref=pd_bxgy_e_img_b?tag=rdegges-20',
& Nbsp; & nbsp; & nbsp; 'Http://www.amazon.com/Canon-50mm-1-8-Camera-Lens/dp/B00007E7JU/ref=sr_1_1?tag=rdegges-20',
& Nbsp; & nbsp; & nbsp; 'Http://www.amazon.com/Canon-70-300mm-4-5-6-Lens-Cameras/dp/B0007Y794O/ref=sr_1_3?tag=rdegges-20'
]
`` `
** NOTA **: Se l'URL si tenta di `` amazonify`` è valido, `` amazonify`` tornerà `` None``.
Confuso?
Non hanno idea di cosa sto parlando? Vedi programma di affiliazione di Amazon.
O ...
Negozio su Amazon!
Test
Per eseguire il test? Nessun problema:
`` `Bash
$ Git clone git: //github.com/rdegges/python-amazonify.git
$ Cd python-amazonify
$ Python setup.py sviluppare
...
$ Pip installare requirements.txt r & nbsp; # Installare dipendenze di prova.
$ nosetests
.............
-------------------------------------------------- --------------------
Ran 13 test in 0.166s
OK
`` `
Requisiti :
- Python
I commenti non trovato