{"id":16776753,"url":"https://github.com/n0tan3rd/cnnreplayservice","last_synced_at":"2025-03-16T18:42:47.446Z","repository":{"id":74125213,"uuid":"85455366","full_name":"N0taN3rd/cnnReplayService","owner":"N0taN3rd","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-24T19:11:21.000Z","size":58,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T05:28:32.903Z","etag":null,"topics":["oduwsdl","web","web-archival","webscidl"],"latest_commit_sha":null,"homepage":"https://github.com/oduwsdl","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N0taN3rd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-19T06:21:10.000Z","updated_at":"2017-03-21T06:48:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f080b6b4-6edd-40d9-b5dd-9fc56dbf6a70","html_url":"https://github.com/N0taN3rd/cnnReplayService","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N0taN3rd%2FcnnReplayService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N0taN3rd%2FcnnReplayService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N0taN3rd%2FcnnReplayService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N0taN3rd%2FcnnReplayService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N0taN3rd","download_url":"https://codeload.github.com/N0taN3rd/cnnReplayService/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911503,"owners_count":20367687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oduwsdl","web","web-archival","webscidl"],"created_at":"2024-10-13T07:10:52.156Z","updated_at":"2025-03-16T18:42:47.426Z","avatar_url":"https://github.com/N0taN3rd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CNN Homepage Replay Service\nReplay mementos of the [CNN](http://cnn.com) homepage from the [Internet Archives](https://archive.org/) locally without failure.\n\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n## Usage\nThis project will run on node \u003e= 6.x and to run `(npm|yarn) install \u0026\u0026 ./run.sh`.\nBe sure to execute `chmod +x run.sh` if you have not already.\nIf your on windows (or do not want to use the bash file) simply substitute `./run.sh`\nwith `node --harmony index.js`.\n\nIf you wonder if your current node install can run this project consult [node.green](http://node.green/).\n\nThere are is only one optional argument that can be supplied to program which is\n--port=\"new port\" defaults to 3000.\n\nOr if Docker is your thing `docker pull jberlin/cnn-replay-service`\nand `docker run -p 3000:3000 jberlin/cnn-replay-service`\n\nOnce started simply navigate to `http://localhost:3000` and happy replaying :tada:\n\n## The Secret Sauce\nThere is none. All this project does is proxy the Internet Archives Wayback Machine\nfor the following URIs `http://web.archive.org/web/*/http://www.cnn.com/` and `http://web.archive.org/web/\u003ccnn.com URI-M\u003e`.\n\nAnd two slight modifications to the replayed Memento :suspect:\n\nThe modifications made are described in the section `Modifications Made To The Replayed Memento`\n\n## Why Is This Necessary\nFor a detailed explaination as to why this is necessary see the blog post from the\nWeb Science And Digital Libraries Research Group:\n[2017-01-20: CNN.com has been unarchivable since November 1st, 2016](http://ws-dl.blogspot.com/2017/01/2017-01-20-cnncom-has-been-unarchivable.html)\n\n#### TL;DR\nCNN has made changes to how the contents of their homepage is loaded. One of the\nmethods used to accommodate these changes is to set the `document.domain` property\nof the global `window` object to `cnn.com`.\n\nThis is not allowed when replayed via\nthe Internet Archives [Wayback Machine](https://archive.org/web/) due to the\n[Same Origin Policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)\nof web browsers. Subsequently causing information about how to load the contents of\nthe page to not be made available to the JavaScript responsible for the\nloading and rendering of it.\n\nDue to this, replaying mementos of the homepage after [2016-11-01T13:15:40](http://web.archive.org/web/20161101131540/http://www.cnn.com/) appear\nto be an archived `about:blank` page.\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"250\" src=\"cnnWhiteOut.png\"/\u003e\n\u003c/p\u003e\n\n\nBut we can replay these mementos. We have the technology.\nWe can replay these mementos as archived. With a few modifications :godmode:\n\n## Modifications Made To The Replayed Memento\nThis project intelligently removes the offending line of JavaScript code\n```js\nwindow.document.domain = \"cnn.com\";\n```\nfrom the second inline `script` tag in the `head` of the mementos HTML\nif it is present at replay time.\n\nThe project also dynamically rewrites specific URI-Rs that the Internet Archives own\nrewrite mechanisms missed to a URI-M corressponding to the datetime of the Memento\ncurrently beging replayed.\n\nFor example if you were to view a Memento of http://www.cnn.com on 2017-03-10T06:03:34\nvia this project the archived pages JavaScript would request\n\n`/data/ocs/section/_homepage-zone-injection/index.html:homepage-injection-zone-2/views/zones/common/zone-manager.izl`\n\nWhich this project would rewrite to `/web/20170310060334/http://www.cnn.com/data/ocs/section/_homepage-zone-injection/index.html:homepage-injection-zone-2/views/zones/common/zone-manager.izl`\n\nWithout these rewrites the page content on 2017-03-10T06:03:34 would not be viewable as\nthese URI-Rs are included in the information made available to the archived pages JavaScript\nby the previous modification made by this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0tan3rd%2Fcnnreplayservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0tan3rd%2Fcnnreplayservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0tan3rd%2Fcnnreplayservice/lists"}