Ignore:
Timestamp:
12/02/16 23:31:14 (6 years ago)
Author:
tt4sk
Message:

First call of goldesel.to with goldesel.py / net.py, store cookie in /mnt/network/cookies, following calls with curl using same cookie and user agent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/goldesel.py

    r39387 r39400  
    1212
    1313    def __init__(self):
    14 #        self.net = Net(cookie_file='/mnt/network/cookie', http_debug=True, cloudflare=True)
    15         self.net = Net(cookie_file='/mnt/network/cookie', cloudflare=True)
     14#        self.net = Net(cookie_file='/mnt/network/cookies', http_debug=True, cloudflare=True)
     15        self.net = Net(cookie_file='/mnt/network/cookies', cloudflare=True)
    1616        url = str(sys.argv[1])
    1717        return self.get_answer_code(url)
     
    2020        headers = {'User-Agent': common.FF_USER_AGENT}                 
    2121        html = self.net.http_GET(web_url, headers=headers).content
    22         #html = self.request(web_url, cookie_file=/mnt/network/cookie, cloudflare=True)
     22        #html = self.request(web_url, cookie_file=/mnt/network/cookies, cloudflare=True)
     23        ret = self.net.save_cookies('/mnt/network/cookies')     
    2324        print "html", html.encode('utf8')
    2425
Note: See TracChangeset for help on using the changeset viewer.