CF BYPASS (#24)

The Calibre dependency was due to the script testing for validity of the
downloaded file, as often they would be corrupted from aa. But CWA is
already doing that, so we are just having redundant code here.

For the cloudflarebypasser, I basically run my own version now, instead
of depending on an external library, this way we have better control for
debugging and on the docker image.

Fixes #18, #33, #27, #48, #65, #78, #86, #88, #89

---------

Co-authored-by: mik593 <91991279+mik593@users.noreply.github.com>
This commit is contained in:
CaliBrain
2025-03-16 02:25:15 -04:00
committed by GitHub
co-authored by mik593
parent 17fdb87749
commit 3a92c5de78
19 changed files with 688 additions and 264 deletions
+59
View File
@@ -0,0 +1,59 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Docker-compose Dev",
"type": "debugpy", // or "debugpy", Node, etc.
"request": "launch",
"program": "${workspaceFolder}/app.py",
"preLaunchTask": "docker-compose up (dev)", // Spin up dev containers
"postDebugTask": "docker-compose down (dev)", // Optional: tear them down
"env": {
"INGEST_DIR": "/tmp/cwa-book-downloader"
},
},
{
"name": "Docker-compose Prod",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/app.py",
"preLaunchTask": "docker-compose up (prod)",
"postDebugTask": "docker-compose down (prod)",
"env": {
"INGEST_DIR": "/tmp/cwa-book-downloader"
},
},
{
"type": "debugpy",
"request": "launch",
"name": "Launch cwa-bd app.py",
"program": "${workspaceFolder}/app.py",
"env": {
"DOCKERMODE": "false",
"INGEST_DIR": "/tmp/cwa-book-downloader"
},
"presentation": {
"hidden": true
}
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Browser",
"url": "http://localhost:8000",
"webRoot": "${workspaceFolder}",
"presentation": {
"hidden": true
}
}
],
"compounds": [
{
"name": "Launch CWA-BD",
"configurations": [
"Launch cwa-bd app.py",
"Launch Browser"
]
}
]
}
+29
View File
@@ -0,0 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "docker-compose up (dev)",
"type": "shell",
"command": "docker-compose -f docker-compose.dev.yml up --build -d",
"problemMatcher": []
},
{
"label": "docker-compose down (dev)",
"type": "shell",
"command": "docker-compose -f docker-compose.dev.yml down",
"problemMatcher": []
},
{
"label": "docker-compose up (prod)",
"type": "shell",
"command": "docker-compose -f docker-compose.yml up -d",
"problemMatcher": []
},
{
"label": "docker-compose down (prod)",
"type": "shell",
"command": "docker-compose -f docker-compose.yml down",
"problemMatcher": []
}
]
}