The Following User Says Thank You to Kossuth For This Useful Post: | ||
|
2016-08-03
, 20:00
|
Posts: 839 |
Thanked: 3,386 times |
Joined on Mar 2009
|
#402
|
|
2017-06-26
, 11:21
|
Posts: 2 |
Thanked: 7 times |
Joined on May 2015
|
#403
|
The Following 2 Users Say Thank You to Librari For This Useful Post: | ||
|
2017-09-10
, 10:42
|
Posts: 839 |
Thanked: 3,386 times |
Joined on Mar 2009
|
#404
|
The Following 3 Users Say Thank You to AapoRantalainen For This Useful Post: | ||
|
2018-03-12
, 00:24
|
Posts: 23 |
Thanked: 49 times |
Joined on May 2011
|
#405
|
import urllib2 import urllib import cookielib # import re from lxml import html USERNAME = "xxxUSERxxx" PASSWORD = "yyyPASSWDyyy" LOGIN_URL = "https://www.geocaching.com/account/login?ReturnUrl=%2Fplay%2Fsearch" URL = "https://www.geocaching.com/seek" def main(): cookie = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie)) respon = opener.open(LOGIN_URL).read() tree = html.fromstring(respon) authenticity_token = list(set(tree.xpath("//input[@name='__RequestVerificationToken']/@value")))[0] print authenticity_token # Create payload payload = { "Username": USERNAME, "Password": PASSWORD, "__RequestVerificationToken": authenticity_token } # Perform login result = opener.open(LOGIN_URL, urllib.urlencode(payload)) result.geturl() info = result.read() print info if __name__ == '__main__': main()
The Following 5 Users Say Thank You to DNA_Splice For This Useful Post: | ||
Is there easy way for me to repackage the deb or is it possible that someone with the necessary tools installed could do it for me. Thanks in advance.
EDIT: Fuggedaboutit. I found out that there is a version in the Extras-Devel that has the right packaging. Got it from there. Now happily cacheing again. Thanks.
Last edited by Kossuth; 2015-08-13 at 07:53. Reason: Problem solved by Extras-Devel