1
0

Use browser_cookie3 instead

This commit is contained in:
Jon Michael Aanes 2025-05-14 23:51:23 +02:00
parent 35ae8fa2a9
commit 2e3d5da34c
2 changed files with 6 additions and 6 deletions

View File

@ -18,10 +18,10 @@ except ImportError:
logger.exception('cfscrape not installed: Certain fetchers might not work')
try:
import browsercookie
import browser_cookie3
except ImportError:
logger.exception('browsercookie not installed: Certain fetchers might not work')
browsercookie = None
logger.exception('browser_cookie3 not installed: Certain fetchers might not work')
browser_cookie3 = None
OUTPUT_PATH = Path('./output')
@ -94,10 +94,10 @@ def available_scraper_names() -> list[str]:
def get_cookiejar(use_cookiejar: bool):
if use_cookiejar:
logger.warning('Got cookiejar from firefox')
cookiejar = browsercookie.firefox()
cookiejar = browser_cookie3.firefox()
if len(cookiejar) > 10:
return cookiejar
browsercookie.firefox(
browser_cookie3.firefox(
['/home/jmaa/.cachy/mbui5xg7.default-release/cookies.sqlite'],
)
if len(cookiejar) > 10:

View File

@ -2,7 +2,7 @@ beautifulsoup4
lxml
requests
requests_cache
browsercookie
browser_cookie3
cfscrape @ git+https://github.com/landryraccoon/cloudflare-scrape.git
frozendict
python-kucoin