J'utilise ActivePython 2.5.1 et le paquet cookielib pour récupérer des pages web.Comment afficher un cookie spécifique?
J'aimerais afficher un cookie donné du cookiejar au lieu de la chose:
#OK to display all the cookies
for index, cookie in enumerate(cj):
print index, ' : ', cookie
#How to display just PHPSESSID?
#AttributeError: CookieJar instance has no attribute '__getitem__'
print "PHPSESSID: %s" % cj['PHPSESSID']
Je suis sûr qu'il est très simple mais googler cela n'a pas renvoyer les échantillons.
Merci.
Merci pour le conseil. – Gulbahar