def cookies():
    if xbmcvfs.exists(generic_utility.cookies_file()):
        xbmcvfs.delete(generic_utility.cookies_file())
        generic_utility.notification(generic_utility.get_string(30301))

    if xbmcvfs.exists(generic_utility.headers_file()):
        xbmcvfs.delete(generic_utility.headers_file())
        generic_utility.notification(generic_utility.get_string(30302))
def cookies():
    if xbmcvfs.exists(generic_utility.cookies_file()):
        xbmcvfs.delete(generic_utility.cookies_file())
        generic_utility.notification(generic_utility.get_string(30301))

    if xbmcvfs.exists(generic_utility.headers_file()):
        xbmcvfs.delete(generic_utility.headers_file())
        generic_utility.notification(generic_utility.get_string(30302))
def save_headers(session):
    headers =  pickle.dumps(session.headers)

    if test == False:
        headers_file = generic_utility.headers_file()
    else:
        headers_file = 'headers'

    file_utility.write(headers_file, headers)
Beispiel #4
0
def save_headers(session):
    headers = pickle.dumps(session.headers)

    if test == False:
        headers_file = generic_utility.headers_file()
    else:
        headers_file = 'headers'

    file_utility.write(headers_file, headers)
def read_headers():
    if test == False:
        headers_file = generic_utility.headers_file()
    else:
        headers_file = 'headers'
    content = file_utility.read(headers_file)
    if len(content) > 0:
        return pickle.loads(content)
    else:
        generic_utility.log('warning, read empty headers-file')
        return None
Beispiel #6
0
def read_headers():
    if test == False:
        headers_file = generic_utility.headers_file()
    else:
        headers_file = 'headers'
    content = file_utility.read(headers_file)
    if len(content) > 0:
        return pickle.loads(content)
    else:
        generic_utility.log('warning, read empty headers-file')
        return None