View Single Post
Old 06-11-2017, 11:25 PM   #2210
Ser4nb2LUY6e
Connoisseur
Ser4nb2LUY6e began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Jun 2017
Device: Moon+ Reader Pro on Android
Quote:
Originally Posted by gcomyn View Post
I've been working on it, but I am having trouble with the cookies... I've never been able to figure them out...
zero experience with python, but with a little bit of google-fu I came up with this:

Code:
C:\Program Files\Calibre2>calibre-debug.exe
Welcome to the interactive calibre shell!

>>> import urllib2
>>> req = urllib2.Request('https://www.webnovel.com/book/7618111306000905')
>>> res = urllib2.urlopen(req)
>>> cookie = res.info()['Set-Cookie']
>>> cookie
'_csrfToken=kIBXdGijBxz13gkj9SweYHmtWOht0q9xUOp0K0BF; expires=Tue, 12-Jun-2018 03:18:22 GMT; path=/; domain=.webnovel.com; secure'
>>>
Ser4nb2LUY6e is offline   Reply With Quote