mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-07 14:43:04 -04:00
handle new chrome cookie db schema
This commit is contained in:
parent
a1af18230c
commit
a8de9b70d1
2 changed files with 11 additions and 3 deletions
|
@ -110,11 +110,19 @@ class Chrome:
|
||||||
'marking cookies persistent then reading file into memory: %s',
|
'marking cookies persistent then reading file into memory: %s',
|
||||||
cookie_location)
|
cookie_location)
|
||||||
try:
|
try:
|
||||||
|
with sqlite3.connect(cookie_location) as conn:
|
||||||
|
cur = conn.cursor()
|
||||||
|
cur.execute('UPDATE cookies SET is_persistent = 1')
|
||||||
|
except sqlite3.Error:
|
||||||
|
try:
|
||||||
|
# db schema changed around version 66, this is the old schema
|
||||||
with sqlite3.connect(cookie_location) as conn:
|
with sqlite3.connect(cookie_location) as conn:
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
cur.execute('UPDATE cookies SET persistent = 1')
|
cur.execute('UPDATE cookies SET persistent = 1')
|
||||||
except sqlite3.Error:
|
except sqlite3.Error:
|
||||||
self.logger.error('exception updating cookie DB', exc_info=True)
|
self.logger.error(
|
||||||
|
'exception updating cookie DB %s', cookie_location,
|
||||||
|
exc_info=True)
|
||||||
|
|
||||||
cookie_db = None
|
cookie_db = None
|
||||||
try:
|
try:
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -32,7 +32,7 @@ def find_package_data(package):
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='brozzler',
|
name='brozzler',
|
||||||
version='1.1b13.dev288',
|
version='1.1b13.dev289',
|
||||||
description='Distributed web crawling with browsers',
|
description='Distributed web crawling with browsers',
|
||||||
url='https://github.com/internetarchive/brozzler',
|
url='https://github.com/internetarchive/brozzler',
|
||||||
author='Noah Levitt',
|
author='Noah Levitt',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue