Results 1 to 2 of 2

Thread: Use browser's cookies in programs. Yay/Nay?

  1. #1
    txtsd's Avatar
    Joined
    Dec 2012
    Posts
    642
    Userbars
    7
    Thanks
    538
    Thanked
    327/146
    DL/UL
    60/2
    Mentioned
    91 times
    Time Online
    31d 8h 56m
    Avg. Time Online
    10m

    Use browser's cookies in programs. Yay/Nay?

    Are there any downsides to using neopets' cookies from Firefox or Chrome in programs?

    Pros:
    • No need to login every time program runs. Already logged in because of cookie from browser.
    • No need to relogin when going back to browser.
    • You can use the browser and the program simultaneously. It will be like doing things in different tabs. (Only with lightweight activities like checking inventory or banking NPs or reading drama on neoboards or whatever)
    • Useragent is always the same


    Cons:
    idk. Could this cause any problems?

  2. #2

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    Well neopets switches session id every few refreshes so your cookie for the browser would get invalidated or the cookie for your program would. You might be able to overwrite a cookie file that the browser stores but then theres issues like different browsers using different methods or you might try and write to a file at the same time as a browser and get permission errors. User agents are also not set via cookie .

    If you want a browser like cookie function just:
    1. on successfull login save cookie file using cookiejar functioin in python to a file.
    2.Constantly save new cookie on session change or on each request in ur wrapper.
    3.when user closes program and logs back in to same account try to use the cookie first , if the login is no longer valid - then login like step one.

    Easiest way would be to have a folder called cookies then a file username.txt and check for that file on login.
    Last edited by DarkByte; 09-24-2015 at 06:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •