yt-dlp: update integration with abrowser patch.
This commit is contained in:
parent
472b6928a5
commit
c8a2a75e3a
2 changed files with 5 additions and 10 deletions
|
|
@ -27,13 +27,11 @@ index 5675445a..7afd324b 100644
|
||||||
elif browser_name == 'safari':
|
elif browser_name == 'safari':
|
||||||
return _extract_safari_cookies(profile, logger)
|
return _extract_safari_cookies(profile, logger)
|
||||||
elif browser_name in CHROMIUM_BASED_BROWSERS:
|
elif browser_name in CHROMIUM_BASED_BROWSERS:
|
||||||
@@ -124,15 +124,15 @@ def extract_cookies_from_browser(browser_name, profile=None, logger=YDLLogger(),
|
@@ -127,14 +127,14 @@ def extract_cookies_from_browser(browser_name, profile=None, logger=YDLLogger(),
|
||||||
raise ValueError(f'unknown browser: {browser_name}')
|
def _extract_firefox_cookies(profile, container, logger):
|
||||||
|
MAX_SUPPORTED_DB_SCHEMA_VERSION = 16
|
||||||
|
|
||||||
|
|
||||||
-def _extract_firefox_cookies(profile, container, logger):
|
|
||||||
- logger.info('Extracting cookies from firefox')
|
- logger.info('Extracting cookies from firefox')
|
||||||
+def _extract_firefox_cookies(profile, container, logger, browser_name):
|
|
||||||
+ logger.info(f'Extracting cookies from {browser_name}')
|
+ logger.info(f'Extracting cookies from {browser_name}')
|
||||||
if not sqlite3:
|
if not sqlite3:
|
||||||
- logger.warning('Cannot extract cookies from firefox without sqlite3 support. '
|
- logger.warning('Cannot extract cookies from firefox without sqlite3 support. '
|
||||||
|
|
@ -74,16 +72,13 @@ index 5675445a..7afd324b 100644
|
||||||
cursor.execute(
|
cursor.execute(
|
||||||
'SELECT host, name, value, path, expiry, isSecure FROM moz_cookies WHERE originAttributes LIKE ? OR originAttributes LIKE ?',
|
'SELECT host, name, value, path, expiry, isSecure FROM moz_cookies WHERE originAttributes LIKE ? OR originAttributes LIKE ?',
|
||||||
(f'%userContextId={container_id}', f'%userContextId={container_id}&%'))
|
(f'%userContextId={container_id}', f'%userContextId={container_id}&%'))
|
||||||
@@ -186,14 +186,14 @@ def _extract_firefox_cookies(profile, container, logger):
|
@@ -194,11 +194,11 @@ def _extract_firefox_cookies(profile, container, logger):
|
||||||
path=path, path_specified=bool(path), secure=is_secure, expires=expiry, discard=False,
|
path=path, path_specified=bool(path), secure=is_secure, expires=expiry, discard=False,
|
||||||
comment=None, comment_url=None, rest={})
|
comment=None, comment_url=None, rest={})
|
||||||
jar.set_cookie(cookie)
|
jar.set_cookie(cookie)
|
||||||
- logger.info(f'Extracted {len(jar)} cookies from firefox')
|
- logger.info(f'Extracted {len(jar)} cookies from firefox')
|
||||||
+ logger.info(f'Extracted {len(jar)} cookies from {browser_name}')
|
+ logger.info(f'Extracted {len(jar)} cookies from {browser_name}')
|
||||||
return jar
|
return jar
|
||||||
finally:
|
|
||||||
if cursor is not None:
|
|
||||||
cursor.connection.close()
|
|
||||||
|
|
||||||
|
|
||||||
-def _firefox_browser_dirs():
|
-def _firefox_browser_dirs():
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=2
|
VERSION=3
|
||||||
EXTERNAL='deb-src http://deb.debian.org/debian sid main'
|
EXTERNAL='deb-src http://deb.debian.org/debian sid main'
|
||||||
REPOKEY=6ED0E7B82643E131
|
REPOKEY=6ED0E7B82643E131
|
||||||
BACKPORTS=true
|
BACKPORTS=true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue