Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Thanks for this #1

Open
tyeeman opened this issue May 30, 2020 · 34 comments
Open

Thanks for this #1

tyeeman opened this issue May 30, 2020 · 34 comments

Comments

@tyeeman
Copy link

tyeeman commented May 30, 2020

Yes, much appreciated, but will this need updating over and over when Zippy changes, like the repo that motivated you to do this?

@Sorrow446
Copy link
Owner

Welcome. Yup. I plan to add a JS alternative some time in the future. Speed will be sacrificed of course. I'm not sure how frequently ZS change their method, but I'll keep this updated.

@tyeeman
Copy link
Author

tyeeman commented May 30, 2020

I'm only getting one of 6 urls working, the last one here, all links exist.

https://www67.zippyshare.com/v/ZRvsTA0p/file.html
https://www67.zippyshare.com/v/psvXkngU/file.html
https://www67.zippyshare.com/v/9UzuuoX2/file.html
https://www67.zippyshare.com/v/XM1EEQ2D/file.html
https://www67.zippyshare.com/v/606u3EBb/file.html
https://www67.zippyshare.com/v/QqzBqooz/file.html

It would also be nice to output the real links to a file so I could use another downloader. I use aria2c and it maxes out my connection where others don't. As a matter of fact that's all the functionality I need really.

@Sorrow446
Copy link
Owner

Sorrow446 commented May 30, 2020

Will look into. I was thinking about that. I'll add a switch to dump them instead of download. Maybe using the -o switch actually. Something like, -o out.txt

@tyeeman
Copy link
Author

tyeeman commented May 30, 2020

Did you confirm only the last link above works?

@Sorrow446
Copy link
Owner

All are working here. What was the issue?

@tyeeman
Copy link
Author

tyeeman commented May 30, 2020

2020-05-30_105117

@Sorrow446
Copy link
Owner

Sorrow446 commented May 30, 2020

Could you do a search in your browser on the HTML for this? Type in getElementById.

document.getElementById('dlbutton').href = "/d/ZRvsTA0p/" + (541881 % 51245 + 541881 % 913) + "/Rian.Ruined.Star.Wars.part1.rar";

@tyeeman
Copy link
Author

tyeeman commented May 30, 2020

Forgive me, but your app doesn't use my browser so I'm a little confused. You want me to type in the address bar ?

@Sorrow446
Copy link
Owner

Go to the first URL in your browser, then do a search with the F12 key.

@tyeeman
Copy link
Author

tyeeman commented May 30, 2020

OK here it is -

document.getElementById('dlbutton').href = "/d/ZRvsTA0p/" + (764230 % 51245 + 764230 % 913) + "/Rian.Ruined.Star.Wars.part1.rar";
if (document.getElementById('fimage')) {
    document.getElementById('fimage').href = "/i/ZRvsTA0p/" + (764230 % 51245 + 764230 % 913) + "/Rian.Ruined.Star.Wars.part1.rar";
}

@Sorrow446
Copy link
Owner

Sorrow446 commented May 30, 2020

It's still a full regex match. Not sure what's going on here.
EDIT: could you grab the script again? Think you might have an outdated copy.

@tyeeman
Copy link
Author

tyeeman commented May 31, 2020

I downloaded the latest and it matches my current version exactly.

@Sorrow446
Copy link
Owner

Sorrow446 commented May 31, 2020

Are you passing each URL with a single space in between?

@tyeeman
Copy link
Author

tyeeman commented May 31, 2020

I'm using a txt file with one url per line like in the 3rd post above. I guess that's wrong then. I don't see a txt file example in the readme?

@Sorrow446
Copy link
Owner

Sorrow446 commented May 31, 2020

One per line is fine. There is.

Download from text file to "G:\ZS-DL downloads" with HTTPS proxy:
ZS-DL.py -u G:\links.txt -o "G:\ZS-DL downloads" -p 0.0.0.0:8080

After line 90 (r = s.get(url)), could you put print(r.text)?

r = s.get(url)
print(r.text)

This will print the HTML. Paste it into a text editor, and find the text again. #1 (comment)

@tyeeman
Copy link
Author

tyeeman commented May 31, 2020

I get this error -

IndentationError: unindent does not match any outer indentation level

Update - I see I'm using spaces as tabs. I'll try to change it.

@tyeeman
Copy link
Author

tyeeman commented May 31, 2020

OK, tabs restored and it runs. I was going to say everything scrolls off my cmd window, which most does and I couldn't find getElementById. Just for fun I deleted all links except the first one and it did start to download (part1), so it looks like only the last file in my links.txt file works. I left 2 links in the links.txt file and only the second one started to download.

This is the only getElementbyID I could see in my cmd window -

<script src="/ads.js" type="text/javascript"></script>
<script src='https://www.google.com/recaptcha/api.js?render=explicit'></script>
<script type="text/javascript">
    $(document).ready(function() {
        if(document.getElementById('zippyfake')){
          $.cookie('zippyadb', '0', {expires: 99999, domain: 'zippyshare.com', path: '/'});
        } else {
          $.cookie('zippyadb', '1', {expires: 99999, domain: 'zippyshare.com', path: '/'});
        }
    });
</script>

All the previous html has scrolled off my screen.

@tyeeman
Copy link
Author

tyeeman commented May 31, 2020

Ok, we're getting closer, it seems to be related to the end of line character. I just added a line feed character after the last link in links.txt and nothing would download. I'm on Windows I guess that's why this is happening. I'm searching stackoverflow for hints for universal Linux/Windows end of line regex??

@Sorrow446
Copy link
Owner

Fixed :). 7574da8

@tyeeman
Copy link
Author

tyeeman commented May 31, 2020

Working great now, thanks!

@PaulinoRBJ
Copy link

@Sorrow446 Thanks for the script! Do you plan on adding support for dlc containers?

@Sorrow446
Copy link
Owner

Sorrow446 commented Jun 2, 2020

@PaulinoRBJ a08e57f

Please try it out. You can use it by providing the path to your DLC file. It can be used just like regular URLs with the -u arg. You can also mix them with regular URLs.

@PaulinoRBJ
Copy link

PaulinoRBJ commented Jun 3, 2020

@Sorrow446 Thanks! It works great. However there seems to be an issue if multiple DLCs are specified- zs-dl.py seems to handle some of them as DLC containers while the others are treated as URL's. Here's what it looks like:

> zs-dl.py -u *.dlc

 _____ _____     ____  __
|__   |   __|___|    \|  |
|   __|__   |___|  |  |  |__
|_____|_____|   |____/|_____|

Processing DLC container: container1.dlc
Processing DLC container: container2.dlc

URL 1 of 127:
URL failed.
ValueError: Invalid URL: container3.dlc

URL 2 of 127:
URL failed.
ValueError: Invalid URL: container4.dlc

URL 3 of 127:
container1.part01.rar
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500M/500M [01:21<00:00, 6.42MB/s]
.
.

@Sorrow446
Copy link
Owner

@PaulinoRBJ Do you have the latest ver? Forgot a period. f41dc08

@PaulinoRBJ
Copy link

@Sorrow446 Yes, I am using the latest post f41dc08 version.

@Sorrow446
Copy link
Owner

@PaulinoRBJ Damn. Could you send those links so I could reproduce?

@PaulinoRBJ
Copy link

@Sorrow446 sure. I've attached 3 test DLCs I made and then tested with the same results I was getting before.
test-DLCs.zip

➜  ~ zs-dl.py -u *.dlc

 _____ _____     ____  __
|__   |   __|___|    \|  |
|   __|__   |___|  |  |  |__
|_____|_____|   |____/|_____|

Processing DLC container: testf1.dlc
Processing DLC container: testf3.dlc

URL 1 of 3:
URL failed.
ValueError: Invalid URL: testf2.dlc

URL 2 of 3:
testf1
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.00/3.00 [00:00<00:00, 5.07kB/s]

URL 3 of 3:
testf3
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.00/3.00 [00:00<00:00, 4.01kB/s]

@Sorrow446
Copy link
Owner

Sorrow446 commented Jun 3, 2020

@PaulinoRBJ Fixed, sorry for the trouble.

@PaulinoRBJ
Copy link

@Sorrow446 thanks again for this fix, DLCs are now working perfectly. Wasn't any trouble and I love that I was able to help in some way. 😄

@abdulaziz-git
Copy link

@Sorrow446 the pattern is change again, please fix
Thanks

@Sorrow446
Copy link
Owner

Fixed. Pushed to binary and source.

@rcdosado
Copy link

rcdosado commented Apr 9, 2021

zippy updates the pattern again :(

@abdulaziz-git
Copy link

zippy updates the pattern again :(

Yes change the pattern again
@Sorrow446 can you show me how you check new pattern if zippyshare change the pattern?

@Sorrow446
Copy link
Owner

@Sorrow446 the pattern is change again, please fix
Thanks

Fixed. Binary & source.

zippy updates the pattern again :(

Yes change the pattern again
@Sorrow446 can you show me how you check new pattern if zippyshare change the pattern?

Right click -> view page source. Do a search for "document.getElementById('dlbutton')".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants