Comments (7)
The image content is corrupted as compared to an Archive-It WARC. Something's not write in the JS code that is storing the image data. Encoding, maybe?
from warcreate.
Hex 89 is becoming hex EFBFBD. This sounds waaay too familiar, like a BOM issue.
from warcreate.
Part of the problem is that the call to fetch the image data via Ajax has required synchronicity for string building. Otherwise an arraybuffer or a Blob (see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data ) could be used, except the W3C spec says that with these data types must be fetched via Ajax using async.
from warcreate.
See http://stackoverflow.com/questions/21708000/acquring-raw-image-data-when-fetching-image-using-ajax
from warcreate.
An alternative might be to try to capture the image data using the Chrome facilities when it first comes in but the response handlers don't seem to have access to this data.
from warcreate.
Woo, created a basis solution! Now, to scale it.
var hexValue = 0x89;
var png = "PNG";
var hexValueArrayBuffer = new ArrayBuffer(1);
var hexValueInt8Ary = new Int8Array(hexValueArrayBuffer);
hexValueInt8Ary[0] = hexValue;
var blob = new Blob([hexValueInt8Ary,png]);
saveAs(blob,"out.txt");
from warcreate.
Content length is now correct for simple case (mkdc) but not for large cases (e.g., CNN.com, FB)
from warcreate.
Related Issues (20)
- Provide additional options within the popup window
- URIs with invalid characters are not escaped HOT 1
- Consider recording Memento Traces to WARCs HOT 1
- Store screenshot of page in WARC, too HOT 2
- WARCs of PDF include browser's wrapper
- Working status, how does it work? HOT 9
- [discussion/thought] Would a custom browser solution work better in terms of capabilities/UI than most current tools/proxies? HOT 14
- Generate WARC from offline MHTML HOT 2
- Adapting code to use manifest v3 HOT 6
- Use WABAC to replay WARCs
- Irrelevant Web Worker requests included HOT 1
- Add BibTeX reference to README
- `Import` WARC with `WebRecorder.AppImage` (and `Upload` to Conifer.Rhizome.org) stops at 50% with `"Error Encountered"`. HOT 4
- Embedded fonts are not included in WARCs HOT 3
- What are the barriers in adapting WARCreate be used in the TOR browser? HOT 1
- Extension not working on most websites HOT 8
- Would it be possible to port this to Firefox? HOT 4
- Decouple from TravisCI for linting/testing
- WARC file names should follow the format recommended in Annex C
- Rádio HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from warcreate.