pax_global_header 0000666 0000000 0000000 00000000064 13434577234 0014526 g ustar 00root root 0000000 0000000 52 comment=80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd
woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/ 0000775 0000000 0000000 00000000000 13434577234 0022314 5 ustar 00root root 0000000 0000000 woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/ 0000775 0000000 0000000 00000000000 13434577234 0023764 5 ustar 00root root 0000000 0000000 woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/ 0000775 0000000 0000000 00000000000 13434577234 0024546 5 ustar 00root root 0000000 0000000 woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/API.txt 0000664 0000000 0000000 00000135444 13434577234 0025733 0 ustar 00root root 0000000 0000000 Adopte un Mec API
------------------
Constants:
APIKEY = fb0123456789abcd
URL = http://api.adopteunmec.com/api.php
ME Commands
===========
me.login
---------
Parameters:
- login
- pass
Errors:
- 1.1.1 : invalid login
Return value:
{u'errors': [],
u'result': {u'baskets': u'384',
u'events': {u'lastBasket': {u'alert': u'1',
u'birthday': u'1989-02-04',
u'city': u'Paris',
u'country': u'fr',
u'cover': u'1',
u'id': u'14471939',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-09-20 13:56:36',
u'list5': u'0',
u'login': u'kloo',
u'mod_level': u'0',
u'path': u'9/3/9/1/7/4/4/',
u'pseudo': u'Kloolloo',
u'region': u'11',
u'sex': 1,
u'shard': 9,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14471939/Kloolloo',
u'zip': u'75001'},
u'lastChat': {u'alert': u'1',
u'birthday': u'1987-10-10',
u'city': u'Paris 18e Arrondissement',
u'country': u'fr',
u'cover': u'0',
u'id': u'13280274',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2010-11-20 03:37:00',
u'list5': u'0',
u'login': u'#c1a63bda81cc03ccdf080ca6e003919e',
u'mod_level': u'0',
u'path': u'4/7/2/0/8/2/3/',
u'pseudo': u'Katie Lee',
u'region': u'11',
u'sex': 1,
u'shard': 4,
u'style': u'0',
u'table': u'adopteun.girls_coma',
u'url': u'/api.php?member/view/13280274/KatieLee',
u'zip': u'75018'},
u'lastFlash': {u'alert': u'1',
u'birthday': u'1983-12-20',
u'city': u'Longjumeau',
u'country': u'fr',
u'cover': u'1',
u'id': u'13883475',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-20 18:52:13',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'5/7/4/3/8/8/3/',
u'pseudo': u'Pas Tjs Sage',
u'region': u'11',
u'sex': 1,
u'shard': 5,
u'style': u'2',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13883475/PasTjsSage',
u'zip': u'91160'},
u'lastMail': {u'alert': u'1',
u'birthday': u'1989-04-28',
u'city': u'Paris 8e Arrondissement',
u'country': u'fr',
u'cover': u'5',
u'id': u'13268738',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-20 19:24:14',
u'list5': u'0',
u'login': u'@13268738',
u'mod_level': u'0',
u'path': u'8/3/7/8/6/2/3/',
u'pseudo': u'Th\xe9na',
u'region': u'11',
u'sex': 1,
u'shard': 8,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13268738/Thna',
u'zip': u'75008'},
u'lastVisit': {u'alert': u'1',
u'birthday': u'1988-02-27',
u'city': u'Paris',
u'country': u'fr',
u'cover': u'1',
u'id': u'14477637',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-20 18:31:00',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'7/3/6/7/7/4/4/',
u'pseudo': u'Lolly',
u'region': u'11',
u'sex': 1,
u'shard': 7,
u'style': u'4',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14477637/Lolly',
u'zip': u'75005'}},
u'flashs': 10,
u'mails': u'731',
u'me': {u'about1': u"Je n'ai pas de temps à perdre, je n'ai ni MSN ni Facebook, je considère qu'on apprécie davantage la discussion face à face autour d'un verre que dans les yeux de son écran.\r
\r
Bon et ne venez que si vous avez quelque chose à me dire, je n'envoie jamais de charmes.",
u'about2': u'',
u'admin': u'0',
u'alert': u'0',
u'alert_add': u'6',
u'birthday': u'1986-08-13',
u'books': u"Orwell (1984, La ferme des animaux)
Barjavel (La nuit des temps, Le voyageur imprudent, Ravage, \x85)
Boris Vian (J'irai cracher sur vos tombes, L'écume des jours\x85)
Bukowski, Desproges, San Antonio
Sartre, Le Canard",
u'cat': u'1',
u'checks1': u'0',
u'checks2': u'16686',
u'checks3': u'0',
u'checks4': u'0',
u'checks5': u'0',
u'checks6': u'2',
u'checks7': u'0',
u'cinema': u'Le Grand Détournement \x97 La Classe Américaine
V pour Vendetta, Pulp Fiction, The Truman Show
Eternal Sunshine of the Spotless Mind, Match Point
Idiocracy, The Big Lebowski, La cité de la peur
Sin City, Orange Mecanique, Buffet Froid, L',
u'city': u'Paris',
u'country': u'fr',
u'cover': u'5',
u'drink': u'2',
u'email': u'tesiruna@parano.me',
u'eyes': u'3',
u'f': u'',
u'first_cnx': u'2010-05-16 09:13:53',
u'first_ip': u'81.57.125.104',
u'food': u'1',
u'godfather': u'0',
u'hair_color': u'5',
u'hair_size': u'3',
u'hobbies': u'',
u'id': u'22450639',
u'img_count': u'5',
u'isBan': False,
u'isOnline': True,
u'job': u'Dieu',
u'last_chat': u'-0001-11-29 23:09:21',
u'last_cnx': u'2011-09-20 19:24:25',
u'last_ip': u'88.161.27.232',
u'lat': u'48.861961',
u'latR': u'0.852802098431',
u'list1': u'2',
u'list2': u'2',
u'list3': u'2',
u'list4': u'3',
u'list5': u'0',
u'list6': u'0',
u'lng': u'2.33594',
u'lngR': u'0.040769844129',
u'login': u'@22450639',
u'mod_level': u'1',
u'music': u"Pink Floyd, Scorpions, Emperor
Metallica, Iron Maiden, Accept
Slash's Snakepit, Queen, Deep Purple
Led Zeppelin, Rolling Stones
Brassens, Souchon, Brel, Vian",
u'origins': u'1',
u'pass': u'8f3fa83cec9a243ae53c1337d2b5e1cf',
u'path': u'9/3/6/0/5/4/2/',
u'phone': u'-',
u'pictures': [{u'file': u'5',
u'height': u'427',
u'id': u'7315391',
u'md5': u'859fcd2e425617c33c16d6a1bc510ad3',
u'member': u'22450639',
u'rank': u'1',
u'valid': u'1578737',
u'width': u'500'}],
u'pseudo': u'Nazification',
u'region': u'11',
u'sex': 0,
u'shape': u'1',
u'shard': 9,
u'size': u'175',
u'smoke': u'2',
u'style': u'0',
u'subregion': u'76',
u'table': u'adopteun.boys',
u'texts1': u'',
u'texts2': u'',
u'texts3': u'',
u'texts4': u'',
u'texts5': u'',
u'texts6': u'',
u'title': u'',
u'tvs': u'Je ne possède pas la TV
',
u'url': u'/api.php?member/view/22450639/Nazification',
u'validated': True,
u'visites': u'0',
u'w': u'',
u'warn': u'0',
u'weight': u'55',
u'zip': u'75000'},
u'news': {u'newBaskets': 3, u'newMails': 1, u'newVisits': 113},
u'popu': u'71540',
u'subMobile': False,
u'subWebsite': False,
u'token': u'ea7bac8837f6e5bb1e2a3267d6a08b32e388d593',
u'visites': u'958'}}
me.[default]
------------
Return value:
{u'errors': [],
u'result': {u'events': {u'lastBasket': {u'alert': u'1',
u'birthday': u'1989-02-04',
u'city': u'Paris',
u'country': u'fr',
u'cover': u'1',
u'id': u'14471939',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-09-20 13:56:36',
u'list5': u'0',
u'login': u'kloo',
u'mod_level': u'0',
u'path': u'9/3/9/1/7/4/4/',
u'pseudo': u'Kloolloo',
u'region': u'11',
u'sex': 1,
u'shard': 9,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14471939/Kloolloo',
u'zip': u'75001'},
u'lastChat': {u'alert': u'1',
u'birthday': u'1987-10-10',
u'city': u'Paris 18e Arrondissement',
u'country': u'fr',
u'cover': u'0',
u'id': u'13280274',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2010-11-20 03:37:00',
u'list5': u'0',
u'login': u'#c1a63bda81cc03ccdf080ca6e003919e',
u'mod_level': u'0',
u'path': u'4/7/2/0/8/2/3/',
u'pseudo': u'Katie Lee',
u'region': u'11',
u'sex': 1,
u'shard': 4,
u'style': u'0',
u'table': u'adopteun.girls_coma',
u'url': u'/api.php?member/view/13280274/KatieLee',
u'zip': u'75018'},
u'lastFlash': {u'alert': u'1',
u'birthday': u'1983-12-20',
u'city': u'Longjumeau',
u'country': u'fr',
u'cover': u'1',
u'id': u'13883475',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-20 18:52:13',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'5/7/4/3/8/8/3/',
u'pseudo': u'Pas Tjs Sage',
u'region': u'11',
u'sex': 1,
u'shard': 5,
u'style': u'2',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13883475/PasTjsSage',
u'zip': u'91160'},
u'lastMail': {u'alert': u'1',
u'birthday': u'1989-04-28',
u'city': u'Paris 8e Arrondissement',
u'country': u'fr',
u'cover': u'5',
u'id': u'13268738',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-20 19:47:28',
u'list5': u'0',
u'login': u'@13268738',
u'mod_level': u'0',
u'path': u'8/3/7/8/6/2/3/',
u'pseudo': u'Th\xe9na',
u'region': u'11',
u'sex': 1,
u'shard': 8,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13268738/Thna',
u'zip': u'75008'},
u'lastVisit': {u'alert': u'1',
u'birthday': u'1988-02-27',
u'city': u'Paris',
u'country': u'fr',
u'cover': u'1',
u'id': u'14477637',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-09-20 19:09:00',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'7/3/6/7/7/4/4/',
u'pseudo': u'Lolly',
u'region': u'11',
u'sex': 1,
u'shard': 7,
u'style': u'4',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14477637/Lolly',
u'zip': u'75005'}},
u'news': {u'newBaskets': 0, u'newMails': 1, u'newVisits': 113},
u'token': u'9a97a03774c9f440e676c78f48794a7221a67285'}}
me.basket
----------
Return value:
{u'errors': [],
u'popu': 71840,
u'result': {u'basket': [{u'alert': u'1',
u'birthday': u'1989-02-04',
u'city': u'Paris',
u'country': u'fr',
u'cover': u'1',
u'date': u'2011-09-19 01:52:29',
u'id': u'14471939',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-09-20 13:56:36',
u'list5': u'0',
u'login': u'kloo',
u'mod_level': u'0',
u'path': u'9/3/9/1/7/4/4/',
u'pseudo': u'Kloolloo',
u'region': u'11',
u'sex': 1,
u'shard': 9,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14471939/Kloolloo',
u'zip': u'75001'}],
u'inBasket': 57,
u'token': u'ea7bac8837f6e5bb1e2a3267d6a08b32e388d593'}}
me.flashs
---------
Return value:
{u'errors': [],
u'result': {u'all': [{u'date': u'2011-10-19 10:50:43',
u'fid': u'41311269',
u'id': u'12656592',
u'member': {u'alert': u'1',
u'birthday': u'1986-08-08',
u'city': u'Armes',
u'country': u'fr',
u'cover': u'3',
u'id': u'12656592',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-10-19 17:28:00',
u'list5': u'0',
u'login': u'@12656592',
u'mod_level': u'0',
u'path': u'2/9/5/6/5/6/2/',
u'pseudo': u'Yayanne',
u'region': u'5',
u'sex': 1,
u'shard': 2,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/12656592/Yayanne',
u'zip': u'58500'},
u'seen': u'2011-10-19 10:54:09'}],
u'count': 1467,
u'news': [],
u'olds': [],
u'popu': u'110350',
u'token': u'3af90dd563431fe6b4c65930d18337c997fac34e'}}
me.visits
---------
Return value:
{u'errors': [],
u'result': {u'count': u'607',
u'news': [],
u'offset': 0,
u'olds': [{u'alert': u'0',
u'birthday': u'1985-01-29',
u'city': u'Albi',
u'country': u'fr',
u'cover': u'11',
u'date': u'2011-10-19 17:40:43',
u'id': u'13461054',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-10-19 17:47:25',
u'list5': u'0',
u'login': u'@13461054',
u'mod_level': u'0',
u'path': u'4/5/0/1/6/4/3/',
u'pseudo': u'Bruume',
u'region': u'15',
u'seen': u'2011-10-19 17:42:55',
u'sex': 1,
u'shard': 4,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13461054/Bruume',
u'vid': u'199226074',
u'zip': u'81000'}],
u'popu': u'110350',
u'token': u'd7380871794008c94971acec82b7b679dd800307'}}
MESSAGE Commands
================
message.[default]
-----------------
Arguments:
- P=,
Return value:
{u'errors': [],
u'result': {u'count': 1,
u'threads': [{u'cat': u'0',
u'date': u'2011-09-20 19:22:11',
u'id': u'11132125',
u'id_from': u'13268738',
u'id_to': u'22450639',
u'member': {u'alert': u'1',
u'birthday': u'1989-04-28',
u'city': u'Paris 8e Arrondissement',
u'country': u'fr',
u'cover': u'5',
u'id': u'13268738',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-20 19:54:15',
u'list5': u'0',
u'login': u'@13268738',
u'mod_level': u'0',
u'path': u'8/3/7/8/6/2/3/',
u'pseudo': u'Th\xe9na',
u'region': u'11',
u'sex': 1,
u'shard': 8,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13268738/Thna',
u'zip': u'75008'},
u'message': u'0',
u'status': u'0',
u'title': u"J'aime bien les \xe9l\xe9phants. Toi ?"}],
u'token': u'0f70c31bc6d05d45bee64e6f2eab9b537640f2f8'}}
message.thread
--------------
Parameters:
- memberId
- count
Return value:
{u'result': {u'popu': u'15910',
u'thread': {u'isNew': False,
u'member': {u'alert': u'3',
u'birthday': u'1987-04-22',
u'city': u'Maisons-Alfort',
u'country': u'fr',
u'cover': u'6',
u'id': u'14022243',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-09-20 18:18:00',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'3/4/2/2/2/0/4/',
u'pseudo': u'Sophkipeut',
u'region': u'11',
u'sex': 1,
u'shard': 3,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14022243/Sophkipeut',
u'zip': u'94700'},
u'messages': [{u'date': u'2011-09-19 17:52:03',
u'id': u'46583458',
u'id_from': u'14022243',
u'id_to': u'23185402',
u'message': u"Lol, moi j'ai fait attention, mais bon ça n'empêche pas son bidou, ceci dit c'est planqué par ses loooooooooooong poils ^^",
u'src': u'',
u'title': u"Lol, moi j'ai fait attention, mais bon \xe7a n'emp\xea..."},
{u'date': u'2011-09-19 17:49:39',
u'id': u'47467748',
u'id_from': u'23185402',
u'id_to': u'14022243',
u'message': u"Ah oui, justement le vétérinaire m'avait dit après la castration de Futex qu'il fallait faire attention à son poids, du coup ça m'a tellement vexé que j'ai fais attention au point qu'il est sans doute même trop maigre.",
u'src': u'',
u'title': u"Ah oui, justement le v\xe9t\xe9rinaire m'avait dit apr\xe8..."}],
u'remoteStatus': u'2',
u'status': u'1',
u'warning': 0},
u'token': u'dbeccf96256d4f11991626707881fdba28f54d73'}}
message.new
-----------
Parameters:
- memberId
- message
Return value:
{u'errors': [],
u'result': {u'thread': {u'isNew': False,
u'member': {u'alert': u'1',
u'birthday': u'1986-12-08',
u'city': u'Rosny-sous-Bois',
u'country': u'fr',
u'cover': u'6',
u'id': u'11099536',
u'isBan': False,
u'isOnline': False,
u'last_cnx': u'2011-09-20 16:26:32',
u'list5': u'0',
u'login': u'@11099536',
u'mod_level': u'0',
u'path': u'6/3/5/9/9/0/1/',
u'pseudo': u'Debo',
u'region': u'11',
u'sex': 1,
u'shard': 6,
u'style': u'0',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/11099536/Debo',
u'zip': u'93110'},
u'messages': [{u'date': u'2011-09-20 20:09:07',
u'id': u'46588573',
u'id_from': u'23185402',
u'id_to': u'11099536',
u'message': u'Coucou',
u'src': u'iphone',
u'title': u'Coucou'},
{u'date': u'2011-09-20 16:27:34',
u'id': u'46638469',
u'id_from': u'11099536',
u'id_to': u'23185402',
u'message': u"Coucou pour tout t'avouer je ne m'y etais pas connecté depuis septembre ! un peu moins de boulot alors j'y traine !!\r\n\r\nEt toi ça va? tu devais pas partir au canada? tu es deja revenu.?",
u'src': u'',
u'title': u"Coucou pour tout t'avouer je ne m'y etais pas co..."}],
u'remoteStatus': u'0',
u'status': u'2',
u'warning': 0},
u'token': u'2491f8ccb6741ceee2a461dc523939796904a0fa'}}
message.delete
--------------
Parameters:
- id_user
Return Value:
Unknown
MEMBER Commands
===============
member.view
-----------
Parameters:
- id
Return value:
{u'errors': [],
u'result': {u'member': {u'about1': u"comment te dire.. j'ai autant envie te laisser boire dans ma bouteille que mettre ma langue dans ta bouche !",
u'about2': u"LES BISOUS C'EST BIEN LES BIJOUX C'EST MIEUX!\r
\r
Et l'humour encore plus, mouhaha\r
\r
PS: Si vous êtes le sosie de Pharell Williams, adoptez moi ;)",
u'admin': u'0',
u'alert': u'1',
u'alert_add': u'0',
u'birthday': u'1991-05-31',
u'books': u"L'Analphabète - Rendell
Etat limite - Assouline
Marie-Antoinette - Zweig
",
u'cat': u'2',
u'checks1': u'2',
u'checks2': u'1588',
u'checks3': u'0',
u'checks4': u'0',
u'checks5': u'64',
u'checks6': u'192',
u'checks7': u'0',
u'cinema': u"My Blueberry Night
Shinning - L'exorciste - Ester - Gothika
How High ! - Requiem for a dream
Remember Me - trainspotting
He gots game - Buffet froid",
u'city': u'Paris',
u'country': u'fr',
u'cover': u'1',
u'drink': u'2',
u'eyes': u'5',
u'f': u'',
u'first_cnx': u'2011-09-17 00:18:59',
u'first_ip': u'82.120.134.233',
u'food': u'3',
u'godfather': u'0',
u'hair_color': u'4',
u'hair_size': u'3',
u'hobbies': u'Le théâtre définitivement ! et le sport !',
u'id': u'14465370',
u'img_count': u'6',
u'isBan': False,
u'isOnline': False,
u'job': u'etudiante',
u'last_chat': u'0000-00-00 00:00:00',
u'last_cnx': u'2011-09-24 00:09:29',
u'last_ip': u'92.151.177.164',
u'lat': u'48.8814',
u'latR': u'0.853141372984',
u'list1': u'0',
u'list2': u'42',
u'list3': u'0',
u'list4': u'0',
u'list5': u'0',
u'list6': u'0',
u'lng': u'2.3365',
u'lngR': u'0.0407796179728',
u'login': u'@',
u'mailable': True,
u'mod_level': u'0',
u'music': u'Daft Punk - Bloody Beetrots - Kid Cudi - Jamiroquai
Red Hot - Ray Charles - BEP - Gorillaz - Birdy nam nam
Citizen Cope - Angus & Julia Stone - Portishead
50cent - Sia - Ben Harper - Busta Rhymes
Musiques de gansta ! ET Debussy',
u'origins': u'1',
u'path': u'0/7/3/5/6/4/4/',
u'phone': u'-',
u'popu': {u'bonus': u'6',
u'contacts': u'1',
u'flashs': u'246',
u'id': u'14465370',
u'invits': u'0',
u'mails': u'39',
u'popu': u'11345',
u'visites': u'645'},
u'pseudo': u'Ruslana',
u'region': u'11',
u'sex': 1,
u'shape': u'1',
u'shard': 0,
u'size': u'170',
u'smoke': u'2',
u'style': u'4',
u'subregion': u'76',
u'table': u'adopteun.girls',
u'texts1': u'',
u'texts2': u'',
u'texts3': u'',
u'texts4': u'',
u'texts5': u'',
u'texts6': u'MON SOURIRE HAHAHA',
u'title': u'',
u'tvs': u'Dexter
OC
True blood
Envoyé spécial ;) - Arte !
',
u'url': u'/api.php?member/view/14465370/Ruslana',
u'visites': u'0',
u'w': u'',
u'warn': u'0',
u'weight': u'50',
u'zip': u'75008'},
u'token': u'e0247704012e01bc32756b357b010e5206ac9c76'}}
member.pictures
---------------
Parameters:
- id
Return value:
{u'errors': [],
u'result': {u'pictures': [{u'id': u'12363004',
u'rating': 4.4473684210500002,
u'url': u'http://s0.adopteunmec.com/0/6/0/1/6/image7.jpg'}],
u'token': u'e131f1b194f2a19337882398b10b79457a638252'}}
member.addBasket
----------------
Parameters:
- id
Errors:
- 5.1.1 : member does not exist
- 5.1.5 : already sent charm to this one
- 5.1.6 : no enough charms available
Return value:
{u'errors': u'0',
u'flashs': 4,
u'result': {u'token': u'55039d0557393bb7c5e4381792143d003f0e60c0'}}
SEARH Commands
==============
search.[default]
----------------
Return value:
{u'errors': [],
u'result': {u'qsearch': {u'ageMax': u'25',
u'ageMin': u'18',
u'dist': u'0',
u'new': u'0',
u'query': u'{"sex":1,"ageMin":"18","ageMax":"25","region":"fr","new":"0","dist":"0"}',
u'region': u'fr',
u'sex': 1},
u'search': {u'ageMax': u'27',
u'ageMin': u'20',
u'checks1': u'0',
u'checks2': u'0',
u'country': u'fr',
u'dist': u'50',
u'drink': u'0',
u'eyes': u'0',
u'food': u'0',
u'hair_color': u'0',
u'hair_size': u'0',
u'origins': u'0',
u'pseudo': u'',
u'query': u'{"ageMin":"20","ageMax":"27","country":"fr","region":"11","subregion":"0","dist":"50","pseudo":"","sex":"1","sizeMin":"0","sizeMax":"0","weightMin":"0","weightMax":"75","shape":"0","hair_size":"0","hair_color":"0","eyes":"0","origins":"0","style":"0","checks1":"0","checks2":"0","smoke":"0","drink":"0","food":"0","search":"true"}',
u'region': u'11',
u'search': u'true',
u'sex': u'1',
u'shape': u'0',
u'sizeMax': u'0',
u'sizeMin': u'0',
u'smoke': u'0',
u'style': u'0',
u'subregion': u'0',
u'weightMax': u'75',
u'weightMin': u'0'},
u'token': u'3196a3365d927f2ee8738ec8dfc4a5abd75e3ee3'}}
search.quick
------------
Parameters:
- sex (int[0,1])
- ageMin (int)
- ageMax (int)
- region (str)
- new (int)
- dist (int)
Return Value:
{u'errors': [],
u'result': {u'regions': {u'be': None,
u'be_24': u' - wallonie',
u'be_25': u' - bruxelles capitale',
u'be_26': u' - flandre',
u'ca': None,
u'ca_34': u' - canada',
u'ca_35': u' - quebec',
u'ch': None,
u'ch_27': u' - r\xe9gion l\xe9manique',
u'ch_28': u' - espace Mittelland',
u'ch_29': u' - suisse du nord-ouest',
u'ch_30': u' - zurich',
u'ch_31': u' - suisse orientale',
u'ch_32': u' - suisse centrale',
u'ch_33': u' - tessin',
u'fr': None,
u'fr_1': u' - alsace',
u'fr_10': u' - haute-normandie',
u'fr_11': u' - ile-de-france',
u'fr_12': u' - languedoc-roussillon',
u'fr_13': u' - limousin',
u'fr_14': u' - lorraine',
u'fr_15': u' - midi-pyr\xe9n\xe9es',
u'fr_16': u' - nord-pas-de-calais',
u'fr_17': u' - paca',
u'fr_18': u' - pays de la loire',
u'fr_19': u' - picardie',
u'fr_2': u' - aquitaine',
u'fr_20': u' - poitou-charentes',
u'fr_21': u' - rh\xf4ne-alpes',
u'fr_22': u' - corse',
u'fr_23': u' - dom+tom',
u'fr_3': u' - auvergne',
u'fr_4': u' - basse-normandie',
u'fr_5': u' - bourgogne',
u'fr_6': u' - bretagne',
u'fr_7': u' - centre',
u'fr_8': u' - champagne-ardenne',
u'fr_9': u' - franche-comt\xe9'},
u'search': [{u'alert': u'2',
u'birthday': u'1985-11-21',
u'city': u'Boulogne-Billancourt',
u'country': u'fr',
u'cover': u'12',
u'id': u'14252744',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-24 15:19:48',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'4/4/7/2/5/2/4/',
u'pseudo': u'Birdy',
u'region': u'11',
u'sex': 1,
u'shard': 4,
u'style': u'5',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/14252744/Birdy',
u'zip': u'92100'}],
u'token': u'ef78ac6d812ab15f2f8efd578f4da4ef2e23aa71'}}
search.advanced
---------------
Parameters:
- ageMin (int)
- ageMax (int)
- country (str)
- region (int)
- subregion (int)
- dist (int)
- pseudo (str)
- sex (int[0,1])
- sizeMin (int)
- sizeMax (int)
- weightMin (int)
- weightMax (int)
- shape (int)
- hair_size (int)
- hair_color (int)
- eyes (int)
- origins (int)
- style (int)
- checks1 (int)
- checks2 (int)
- smoke (int)
- drink (int)
- food (int)
- search (bool)
Return Value:
{u'errors': [],
u'regions': {u'be': None,
u'be_24': u' - wallonie',
u'be_25': u' - bruxelles capitale',
u'be_26': u' - flandre',
u'ca': None,
u'ca_34': u' - canada',
u'ca_35': u' - quebec',
u'ch': None,
u'ch_27': u' - r\xe9gion l\xe9manique',
u'ch_28': u' - espace Mittelland',
u'ch_29': u' - suisse du nord-ouest',
u'ch_30': u' - zurich',
u'ch_31': u' - suisse orientale',
u'ch_32': u' - suisse centrale',
u'ch_33': u' - tessin',
u'fr': None,
u'fr_1': u' - alsace',
u'fr_10': u' - haute-normandie',
u'fr_11': u' - ile-de-france',
u'fr_12': u' - languedoc-roussillon',
u'fr_13': u' - limousin',
u'fr_14': u' - lorraine',
u'fr_15': u' - midi-pyr\xe9n\xe9es',
u'fr_16': u' - nord-pas-de-calais',
u'fr_17': u' - paca',
u'fr_18': u' - pays de la loire',
u'fr_19': u' - picardie',
u'fr_2': u' - aquitaine',
u'fr_20': u' - poitou-charentes',
u'fr_21': u' - rh\xf4ne-alpes',
u'fr_22': u' - corse',
u'fr_23': u' - dom+tom',
u'fr_3': u' - auvergne',
u'fr_4': u' - basse-normandie',
u'fr_5': u' - bourgogne',
u'fr_6': u' - bretagne',
u'fr_7': u' - centre',
u'fr_8': u' - champagne-ardenne',
u'fr_9': u' - franche-comt\xe9'},
u'result': {u'search': [{u'alert': u'1',
u'birthday': u'1988-04-07',
u'city': u'Dammartin',
u'country': u'fr',
u'cover': u'25',
u'id': u'13579115',
u'isBan': False,
u'isOnline': True,
u'last_cnx': u'2011-09-24 15:17:22',
u'list5': u'0',
u'login': u'@',
u'mod_level': u'0',
u'path': u'5/1/1/9/7/5/3/',
u'pseudo': u"S\xe9 's\xe9",
u'region': u'11',
u'sex': 1,
u'shard': 5,
u'style': u'1',
u'table': u'adopteun.girls',
u'url': u'/api.php?member/view/13579115/Ss',
u'zip': u'77230'}],
u'token': u'f92aede46118dcdba6d484146b4627777fbe7188'}}
woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/__init__.py 0000664 0000000 0000000 00000001562 13434577234 0026663 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from .browser import AuMBrowser
from .module import AuMModule
__all__ = ['AuMBrowser', 'AuMModule']
woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/antispam.py 0000664 0000000 0000000 00000011736 13434577234 0026744 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
import re
class AntiSpam(object):
def check_thread(self, thread):
resume = thread['title']
# Check if there is an email address in the offer.
if re.match('^[\w\d\.\-_]+@[\w\d\.]+ vous offre la pos', resume):
return False
if thread['who']['pseudo'] == 'Ekaterina':
return False
return True
def check_profile(self, profile):
# The name of profile is in form #123456789
if profile['pseudo'] == '':
return False
if profile['announce'].startswith('salut! je te donne mon msn'):
return False
if profile['shopping_list'].startswith('cam to cam'):
return False
if profile['shopping_list'].startswith('je suis une femme tres tres belle et je recherche un homme qui aime le sexe'):
return False
if profile['shopping_list'].endswith('mmmmmmmmmmmmmmmm'):
return False
return True
# ipaddr is not available anymore.
for ipaddr in (profile['last_ip'], profile['first_ip']):
if ipaddr.startswith('41.202.'):
return False
if ipaddr.startswith('41.250.'):
return False
if ipaddr.startswith('41.251.'):
return False
if ipaddr.startswith('41.141.'):
return False
if ipaddr.startswith('194.177.'):
return False
if ipaddr.startswith('41.85.'):
return False
if ipaddr.startswith('41.86.'):
return False
if ipaddr.startswith('196.47.'):
return False
if re.match('105\.13\d.*', ipaddr):
return False
if ipaddr in ('62.157.186.18', '198.36.222.8', '212.234.67.61', '203.193.158.210', '41.189.34.180', '41.66.12.36', '196.47.137.21', '213.136.125.122', '41.191.87.188'):
return False
return True
def check_contact(self, contact):
if contact.id == 1:
return True
if not self.check_profile(contact._aum_profile):
return False
return True
# ipaddr is not available anymore.
first_ip = contact.profile['info']['IPaddr'].value.split(' ')[0]
last_ip = contact.profile['info']['IPaddr'].value.rstrip(')')
for ipaddr in (first_ip, last_ip):
if ipaddr.endswith('.afnet.net'):
return False
if ipaddr.endswith('.iam.net.ma'):
return False
if ipaddr.endswith('.amsterdam.ananoos.net'):
return False
if ipaddr.endswith('.tedata.net'):
return False
if ipaddr.endswith('kupo.fr'):
return False
if ipaddr.endswith('.static.virginmedia.com'):
return False
if ipaddr.endswith('frozenway.com'):
return False
if ipaddr.endswith('.rev.bgtn.net'):
return False
if ipaddr.endswith('real-vpn.com'):
return False
if ipaddr.endswith('.nl.ipodah.net'):
return False
if ipaddr.endswith('.wanamaroc.com'):
return False
if ipaddr.endswith('.ukservers.com'):
return False
if ipaddr.endswith('.startdedicated.com'):
return False
if ipaddr.endswith('.clients.your-server.de'):
return False
if ipaddr.endswith('.cba.embratel.net.br'):
return False
if ipaddr.endswith('.idstelcom.com'):
return False
if ipaddr.endswith('proxy.chg-support.com'):
return False
if ipaddr.endswith('.sprintsvc.net'):
return False
if ipaddr.endswith('.relakks.com'):
return False
return True
def check_mail(self, mail):
# Spambot with a long first-message.
if mail['message'] is None:
return True
if mail['message'].find('Je veux que vous m\'ayez ecrit directement sur le mon e-mail') >= 0:
return False
if mail['message'].find('ilusa12010@live.fr') >= 0:
return False
return True
woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/browser.py 0000664 0000000 0000000 00000023311 13434577234 0026603 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2008-2011 Romain Bignon, Christophe Benz
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from base64 import b64encode
from hashlib import sha256
from datetime import datetime
import math
import re
from weboob.exceptions import BrowserIncorrectPassword, BrowserHTTPNotFound, BrowserUnavailable
from weboob.browser.exceptions import ClientError
from weboob.browser.browsers import LoginBrowser, DomainBrowser
from weboob.browser.pages import HTMLPage
from weboob.browser.filters.standard import CleanText
from weboob.tools.date import local2utc
from weboob.capabilities.messages import CantSendMessage
__all__ = ['AuMBrowser']
class WebsiteBrowser(LoginBrowser):
BASEURL = 'https://www.adopteunmec.com'
VERIFY = False
TIMEOUT = 3.0
def do_login(self):
data = {'username': self.username,
'password': self.password,
'remember': 'on',
}
self.open('/auth/login', data=data)
def get_profile(self, id):
profile = {}
if datetime.now().hour >= 18 or datetime.now().hour < 1:
return profile
r = None
try:
r = self.open('https://www.adopteunmec.com/profile/%s' % id)
except BrowserUnavailable:
pass
if r is None or not re.match('https://www.adopteunmec.com/profile/\d+', r.url):
self.do_login()
try:
r = self.open('https://www.adopteunmec.com/profile/%s' % id)
except BrowserUnavailable:
r = None
if r is None:
return {}
page = HTMLPage(self, r)
doc = page.doc
profile['popu'] = {}
for tr in doc.xpath('//div[@id="popularity"]//tr'):
cols = tr.findall('td')
if not cols[0].text:
continue
key = CleanText('./th')(tr).strip().lower()
value = int(re.sub(u'[^0-9]+', u'', cols[0].text).strip())
profile['popu'][key] = value
for script in doc.xpath('//script'):
text = script.text
if text is None:
continue
m = re.search("'memberLat'\s*:\s*([\-\d\.]+),", text, re.IGNORECASE)
if m:
profile['lat'] = float(m.group(1))
m = re.search("'memberLng'\s*:\s*([\-\d\.]+),", text, re.IGNORECASE)
if m:
profile['lng'] = float(m.group(1))
return profile
def url2id(func):
def inner(self, id, *args, **kwargs):
m = re.match('^https?://.*adopteunmec.com.*/(\d+)$', str(id))
if m:
id = int(m.group(1))
else:
m = re.match('^https?://.*adopteunmec.com/(index.php/)?profile/(\d+).*', str(id))
if m:
id = int(m.group(2))
return func(self, id, *args, **kwargs)
return inner
class AuMBrowser(DomainBrowser):
BASEURL = 'https://www.adopteunmec.com/api/'
APIKEY = 'fb0123456789abcd'
APITOKEN = 'DCh7Se53v8ejS8466dQe63'
APIVERSION = '2.2.5'
GIRL_PROXY = None
consts = None
my_sex = 0
my_id = 0
my_name = u''
my_coords = (0,0)
def __init__(self, username, password, search_query, *args, **kwargs):
self.username = username
self.password = password
self.search_query = search_query
super(AuMBrowser, self).__init__(*args, **kwargs)
self.login()
self.website = WebsiteBrowser(self.username, self.password, *args, **kwargs)
self.website.do_login()
self.home()
def id2url(self, id):
return u'https://www.adopteunmec.com/profile/%s' % id
def login(self):
self.request('applications/android')
def request(self, *args, **kwargs):
try:
return self.open(*args, **kwargs).json()
except ClientError as e:
if e.response.status_code == 401:
raise BrowserIncorrectPassword()
else:
raise
def build_request(self, url, *args, **kwargs):
headers = kwargs.setdefault('headers', {})
if 'applications' not in url:
today = local2utc(datetime.now()).strftime('%Y-%m-%d')
token = sha256((self.username + self.APITOKEN + today).encode('utf-8')).hexdigest()
headers['Authorization'] = 'Basic %s' % (b64encode(b'%s:%s' % (self.username.encode('utf-8'), self.password.encode('utf-8')))).decode('utf-8')
headers['X-Platform'] = 'android'
headers['X-Client-Version'] = self.APIVERSION
headers['X-AUM-Token'] = token
return super(AuMBrowser, self).build_request(url, *args, **kwargs)
def home(self):
r = self.request('home/')
self.my_sex = r['user']['sex']
self.my_id = int(r['user']['id'])
self.my_name = r['user']['pseudo']
if self.my_coords == (0,0):
profile = self.get_full_profile(self.my_id)
if 'lat' in profile and 'lng' in profile:
self.my_coords = [profile['lat'], profile['lng']]
return r
def get_consts(self):
if self.consts is not None:
return self.consts
self.consts = [{}, {}]
for key, sexes in self.request('values').items():
for sex, values in sexes.items():
if sex in ('boy', 'both'):
self.consts[0][key] = values
if sex in ('girl', 'both'):
self.consts[1][key] = values
return self.consts
def score(self):
r = self.home()
return int(r['user']['points'])
def get_my_name(self):
return self.my_name
def get_my_id(self):
return self.my_id
def nb_new_mails(self):
r = self.home()
return r['counters']['new_mails']
def nb_new_baskets(self):
r = self.home()
return r['counters']['new_baskets']
def nb_new_visites(self):
r = self.home()
return r['counters']['new_visits']
def nb_available_charms(self):
r = self.home()
return r['subscription']['flashes_stock']
def get_baskets(self):
r = self.request('basket', params={'count': 30, 'offset': 0})
return r['results']
def get_flashs(self):
r = self.request('charms/', params={'count': 30, 'offset': 0})
return r['results']
def get_visits(self):
r = self.request('visits', params={'count': 30, 'offset': 0})
return r['results']
def get_threads_list(self, count=30):
r = self.request('threads', params={'count': count, 'offset': 0})
return r['results']
@url2id
def get_thread_mails(self, id, count=30):
r = self.request('threads/%s' % id, params={'count': count, 'offset': 0})
return r
@url2id
def post_mail(self, id, content):
content = content.replace('\n', '\r\n')
try:
self.request('threads/%s' % id, data=content)
except BrowserHTTPNotFound:
raise CantSendMessage('Unable to send message.')
@url2id
def delete_thread(self, id):
r = self.request('message/delete', json={'id_user': id})
self.logger.debug('Thread deleted: %r' % r)
@url2id
def send_charm(self, id):
try:
self.request('users/%s/charms' % id, data='')
except BrowserHTTPNotFound:
return False
else:
return True
@url2id
def add_basket(self, id):
try:
self.request('basket/%s' % id, data='')
except BrowserHTTPNotFound:
return False
else:
return True
def search_profiles(self, **kwargs):
if not self.search_query:
# retrieve query
self.login()
r = self.request('users?count=100&offset=0&%s' % (self.search_query % {'lat': self.my_coords[0], 'lng': self.my_coords[1]}))
ids = [s['id'] for s in r['results']]
return set(ids)
@url2id
def get_full_profile(self, id):
if self.GIRL_PROXY is not None:
profile = self.open(self.GIRL_PROXY % id).json()
if 'lat' in profile and 'lng' in profile:
profile['dist'] = self.get_dist(profile['lat'], profile['lng'])
else:
profile = self.get_profile(id)
return profile
def get_dist(self, lat, lng):
coords = (float(lat), float(lng))
R = 6371
lat1 = math.radians(self.my_coords[0])
lat2 = math.radians(coords[0])
lon1 = math.radians(self.my_coords[1])
lon2 = math.radians(coords[1])
dLat = lat2 - lat1
dLong = lon2 - lon1
a= pow(math.sin(dLat/2), 2) + math.cos(lat1) * math.cos(lat2) * pow(math.sin(dLong/2), 2)
c= 2 * math.atan2(math.sqrt(a), math.sqrt(1-a))
return R * c
@url2id
def get_profile(self, id):
profile = {}
profile.update(self.request('users/%s' % id))
profile.update(self.website.get_profile(id))
# Calculate distance in km.
profile['dist'] = 0.0
if 'lat' in profile and 'lng' in profile:
profile['dist'] = self.get_dist(profile['lat'], profile['lng'])
return profile
woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/contact.py 0000664 0000000 0000000 00000026762 13434577234 0026570 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2008-2011 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from html2text import unescape
import socket
from datetime import datetime
from dateutil.parser import parse as parse_dt
from collections import OrderedDict
from weboob.capabilities.contact import Contact as _Contact, ProfileNode
from weboob.tools.html import html2text
from weboob.tools.compat import unicode, basestring
class FieldBase(object):
def __init__(self, key, key2=None):
self.key = key
self.key2 = key2
def get_value(self, value, consts):
raise NotImplementedError()
class FieldStr(FieldBase):
def get_value(self, profile, consts):
return html2text(unicode(profile[self.key])).strip()
class FieldBool(FieldBase):
def get_value(self, profile, consts):
return bool(int(profile[self.key]))
class FieldDist(FieldBase):
def get_value(self, profile, consts):
return '%.2f km' % float(profile[self.key])
class FieldIP(FieldBase):
def get_hostname(self, s):
try:
return socket.gethostbyaddr(s)[0]
except (socket.gaierror, socket.herror):
return s
def get_value(self, profile, consts):
s = self.get_hostname(profile[self.key])
if profile[self.key] != profile[self.key2]:
s += ' (first %s)' % self.get_hostname(profile[self.key2])
return s
class FieldProfileURL(FieldBase):
def get_value(self, profile, consts):
id = int(profile[self.key])
if id > 0:
return 'http://www.adopteunmec.com/index.php/profile/%d' % id
else:
return ''
class FieldPopu(FieldBase):
def get_value(self, profile, consts):
return unicode(profile['popu'][self.key])
class FieldPopuRatio(FieldBase):
def get_value(self, profile, consts):
v1 = float(profile['popu'][self.key])
v2 = float(profile['popu'][self.key2])
if v2 == 0.0:
return 'NaN'
else:
return '%.2f' % (v1 / v2)
class FieldOld(FieldBase):
def get_value(self, profile, consts):
birthday = parse_dt(profile[self.key])
return int((datetime.now() - birthday).days / 365.25)
class FieldList(FieldBase):
def get_value(self, profile, consts):
return profile[self.key]
class FieldBMI(FieldBase):
def __init__(self, key, key2, fat=False):
FieldBase.__init__(self, key, key2)
self.fat = fat
def get_value(self, profile, consts):
height = int(profile[self.key])
weight = int(profile[self.key2])
if height == 0 or weight == 0:
return ''
bmi = (weight / float(pow(height / 100.0, 2)))
if not self.fat:
return bmi
elif bmi < 15.5:
return 'severely underweight'
elif bmi < 18.4:
return 'underweight'
elif bmi < 24.9:
return 'normal'
elif bmi < 30:
return 'overweight'
else:
return 'obese'
class FieldConst(FieldBase):
def get_value(self, profile, consts):
v = profile[self.key]
if isinstance(v, (basestring,int)):
try:
return consts[self.key][str(v)]
except KeyError:
return ''
elif isinstance(v, (tuple,list)):
labels = []
for i in v:
labels.append(consts[self.key][i])
return labels
class Contact(_Contact):
TABLE = OrderedDict((
('_info', OrderedDict((
('title', FieldStr('title')),
# ipaddr is not available anymore.
#('IPaddr', FieldIP('last_ip', 'first_ip')),
('admin', FieldBool('admin')),
('ban', FieldBool('isBan')),
('first', FieldStr('first_cnx')),
('godfather', FieldProfileURL('godfather')),
))),
('_stats', OrderedDict((
('mails', FieldPopu('mails')),
('charms', FieldPopu('charmes')),
('visites', FieldPopu('visites')),
('baskets', FieldPopu('panier')),
('invits', FieldPopu('invits')),
('bonus', FieldPopu('bonus')),
('score', FieldStr('points')),
('ratio', FieldPopuRatio('mails', 'charmes')),
('mailable', FieldBool('can_mail')),
))),
('details', OrderedDict((
#('old', FieldStr('age')),
('old', FieldOld('birthdate')),
('birthday', FieldStr('birthdate')),
('zipcode', FieldStr('zip')),
('location', FieldStr('city')),
('distance', FieldDist('dist')),
('country', FieldStr('country')),
('phone', FieldStr('phone')),
('eyes', FieldConst('eyes_color')),
('hair_color', FieldConst('hair_color')),
('hair_size', FieldConst('hair_size')),
('height', FieldConst('size')),
('weight', FieldConst('weight')),
('BMI', FieldBMI('size', 'weight')),
('fat', FieldBMI('size', 'weight', fat=True)),
('shape', FieldConst('shape')),
('origins', FieldConst('origins')),
('signs', FieldConst('features')),
('job', FieldStr('job')),
('style', FieldConst('styles')),
('food', FieldConst('diet')),
('favorite_food', FieldConst('favourite_food')),
('drink', FieldConst('alcohol')),
('smoke', FieldConst('tobacco')),
))),
('tastes', OrderedDict((
('hobbies', FieldStr('hobbies')),
('music', FieldList('music')),
('cinema', FieldList('cinema')),
('books', FieldList('books')),
('tv', FieldList('tvs')),
))),
('+sex', OrderedDict((
('underwear', FieldConst('underwear')),
('practices', FieldConst('sexgames')),
('favorite', FieldConst('arousing')),
('toys', FieldConst('sextoys')),
))),
('+personality', OrderedDict((
('snap', FieldStr('fall_for')),
('exciting', FieldStr('turned_on_by')),
('hate', FieldStr('cant_stand')),
('vices', FieldStr('vices')),
('assets', FieldStr('assets')),
('fantasies', FieldStr('fantasies')),
('is', FieldConst('character')),
))),
('-personality', OrderedDict((
('accessories', FieldConst('accessories')),
('skills', FieldConst('skills')),
('socios', FieldConst('socios')),
('family', FieldConst('family')),
('pets', FieldConst('pets')),
)))
))
def parse_profile(self, profile, consts):
if profile['online']:
self.status = Contact.STATUS_ONLINE
self.status_msg = u'online'
self.status_msg = u'since %s' % profile['last_cnx']
else:
self.status = Contact.STATUS_OFFLINE
self.status_msg = u'last connection %s' % profile['last_cnx']
self.summary = unicode(unescape(profile.get('announce', '').strip()))
if len(profile.get('shopping_list', '')) > 0:
self.summary += u'\n\nLooking for:\n%s' % unescape(profile['shopping_list'].strip())
for photo in profile['pics']:
self.set_photo(photo.split('/')[-1],
url=photo + '/full',
thumbnail_url=photo + '/small',
hidden=False)
self.profile = OrderedDict()
if 'sex' in profile:
for section, d in self.TABLE.items():
flags = ProfileNode.SECTION
if section.startswith('_'):
flags |= ProfileNode.HEAD
if (section.startswith('+') and int(profile['sex']) != 1) or \
(section.startswith('-') and int(profile['sex']) != 0):
continue
section = section.lstrip('_+-')
s = ProfileNode(section, section.capitalize(), OrderedDict(), flags=flags)
for key, builder in d.items():
try:
value = builder.get_value(profile, consts[int(profile['sex'])])
except KeyError:
pass
else:
s.value[key] = ProfileNode(key, key.capitalize().replace('_', ' '), value)
self.profile[section] = s
self._aum_profile = profile
woob-80d8d4f930af694bb2ce2ffeb7ce41d7e40f45cd-modules-aum/modules/aum/favicon.png 0000664 0000000 0000000 00000004217 13434577234 0026705 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ % sRGB pHYs tIME 2 !IDAThip]=!ᒅbFAE.P):J]AjVjGFvZ3.R
U[VK$D,I{O?2%عoy{s"("(Te|D.[)EtV4I?2
+eL'vI?R)FP\0BB.l0AiSN~E0:5KC+O8x>[y}!jpNqx2έ>Y98=eO&n)
oްoFĸ!Aq$~=~BOM_gdZnKa1Eb?{GC!QSeS|7ϩq>*3lL0Ɖx-|O^Ԓ6E[dzV>*=z/zTbxj.ng:4@߫kS:)D]&dؕ!K3IJB/h><B$`+;\M
f!(-G72A=ǹ^䒶F.rOG Uԣc\9]|v'ʹ"|
iJuc>UR}?-(7Ҧ3eWPx!yI ![=n$HUCKe:w%HO?D>(KJ!s7,$~f}7uOC͔.чmp)%`|ZUAdqIO|W($o::hoH%mx9/{^dcʷ'Ħ^ZƓER%
80