{"id":18715423,"url":"https://github.com/rawnly/zippyshare-extractor","last_synced_at":"2025-04-12T13:08:49.102Z","repository":{"id":57406138,"uuid":"120002957","full_name":"rawnly/zippyshare-extractor","owner":"rawnly","description":"Extract ZippyShare download url magically ✨","archived":false,"fork":false,"pushed_at":"2018-10-13T22:34:57.000Z","size":60,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T13:08:45.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rawnly.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}},"created_at":"2018-02-02T16:13:04.000Z","updated_at":"2020-01-15T21:18:20.000Z","dependencies_parsed_at":"2022-09-11T23:22:17.753Z","dependency_job_id":null,"html_url":"https://github.com/rawnly/zippyshare-extractor","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fzippyshare-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fzippyshare-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fzippyshare-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fzippyshare-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawnly","download_url":"https://codeload.github.com/rawnly/zippyshare-extractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571891,"owners_count":21126522,"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":[],"created_at":"2024-11-07T13:08:41.662Z","updated_at":"2025-04-12T13:08:49.057Z","avatar_url":"https://github.com/rawnly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZippyShare Extractor \n\u003e Extract ZippyShares download link from the given url magically :sparkles: \n\n## Why\nIt all started when I had to download a file divided into 150 `.rar` files all from zippyshare, as long as they were 2/3 you could do it. But not this time, considering how much they were it could take too much time lost at escaping banners and ADS.\n\n## The problem\nSo once I understand how zippyshare protects itself from `HTTP` requests it was simple. This module analyzes the `HTML` code in the page and runs a script integrated into the zippyshare page which generates a link to the file to be downloaded. This script should self-execute when a user access to the page but no browser no `\u003cscript\u003e` runs.\n\nSo the solution was to clean the page from all the ADS scripts and other superfluous ones and extract the line that generates the path to the file that needs to be downloaded, then thanks to the `eval` function you can easily run it and get the file path.\n\n## The ZippyShare Script \n#### 8 Mar 2018\n```js\nvar a = 36;\n\ndocument.getElementById('dlbutton').omg = \"asdasd\".substr(0, 3);\n\nvar b = document.getElementById('dlbutton').omg.length;\n\ndocument.getElementById('dlbutton').href = \"/d/W1svPisk\" + (Math.pow(a, 3) + b) + \"/path/to/file\";\n\nif ( document.getElementById('fimage') ) {\n\tdocument.getElementById('fimage').href = \"/i/W1svPisk\" + (Math.pow(a, 3) + b) + \"/path/to/file\";\n}\n```\n\n#### 14 Oct 2018\nThe script has changed, now it's really simple (almost the same) \n```js\ndocument.getElementById('dlbutton').href = \"/d/GtIlB8Sw/\" + (715980 % 51245 + 715980 % 913) + \"/path/to/file\"\n\nif ( document.getElementById('fimage') ) {\n\tdocument.getElementById('fimage').href = \"/i/GtIlB8Sw/\" + (715980 % 51245 + 715980 % 913) + \"/path/to/file\"\n}\n```\n\n## Installation \nSimply add `zippyshare-extractor` to your dependecies.\n\n```sh \n\t$ sudo yarn add zippyshare-extractor\n\n\t$ npm i zippyshare-extractor --save\n```\n\n## Usage\n```js\n\timport zippy from 'zippy';\n\timport download from 'simple-download';\n\n\tzippy(zippyshare_url).then(url =\u003e {\n\t\t// do something with the download url\n\n\t\t// Custom download function.\n\t\tdownload({\n\t\t\tpath: '~/desktop',\n\t\t\tfile: url.split('/').pop(),\n\t\t\turl: url\n\t\t}, (pos, item) =\u003e {\n\t\t\tconsole.log(`${item} downloaded successfully.`)\n\t\t})\n\t}).catch(e =\u003e { throw e })\n``` \n\n--------\n\u003cp align=\"center\"\u003e\n    Follow me on\n    \u003cbr\u003e\n\t\u003ca href=\"https://twitter.com/rawnlydev\"\u003eTwitter\u003c/a\u003e • \u003ca href=\"https://instagram.com/fede.vitale\"\u003eInstagram\u003c/a\u003e  • \u003ca href=\"https://github.com/rawnly\"\u003eGitHub\u003c/a\u003e \n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fzippyshare-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawnly%2Fzippyshare-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fzippyshare-extractor/lists"}