Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During gallery/folder ripping the DeviantArt avatar fetching fails with 404 due to an old hardcoded address #577

Open
rautamiekka opened this issue Jun 11, 2017 · 6 comments
Labels

Comments

@rautamiekka
Copy link

rautamiekka commented Jun 11, 2017

NOTE: Syntax as understood as of 2017-06-18 at #577 (comment)

Gave it a while to see if it would just go away as an error on DA's end, but since it wouldn't I checked the site's source code which confirmed the avatar address is a little different from what's hardcoded into RipMe:

Old=http://a.deviantart.net/avatars/o/USERNAME.gif?11
New=http://a.deviantart.net/avatars/l/o/USERNAME.gif?11

My guess is the trailing ?11 is some sorta spot-specific instruction for the GIF, in which case dropping that part would be in our best interest.

@rautamiekka rautamiekka changed the title DeviantArt avatar ripping fails with 404 due to an old hardcoded address During gallery/folder the DeviantArt avatar fetching fails with 404 due to an old hardcoded address Jun 11, 2017
@rautamiekka rautamiekka changed the title During gallery/folder the DeviantArt avatar fetching fails with 404 due to an old hardcoded address During gallery/folder ripping the DeviantArt avatar fetching fails with 404 due to an old hardcoded address Jun 11, 2017
@metaprime
Copy link
Collaborator

@rautamiekka I'm getting 404 on your "New" link, even when I change USERNAME to an actual username. Can you provide a set of links that demonstrate this problem and the link you were trying to rip when it occurred?

@rautamiekka
Copy link
Author

rautamiekka commented Jun 18, 2017

You're right, even the new link is wrong, and now when looked at it again I see the problem: the leading http://a.deviantart.net/avatars/ part is static and the rest is completely predictable but depends on the username.

For example, suppose your name is

  • higglytownhero => http://a.deviantart.net/avatars/h/i/higglytownhero.gif?6
  • rautamiekka => http://a.deviantart.net/avatars/r/a/rautamiekka.gif?5

It takes your first letter for the first folder, then the second letter for the second folder, and your whole username with the .gif extension for the filename. In the case of higglytownhero his name is capitalized as HigglyTownHero, so the usernames in links are always lower-case but the case matters in only filenames.

Notice that the trailing integer parts are different from the links in the OP, and quickly checking around (opening up many avatars in succession) it appears the integer is an avatar type indicator since the integer is same across users with similar avatars.

@metaprime
Copy link
Collaborator

appears the integer is an avatar type indicator since the integer is same across users with similar avatars.

Is this integer also predictable? Perhaps it's the user account type (indicated on the site with a symbol before the name like ~ or =)?

@rautamiekka
Copy link
Author

rautamiekka commented Jun 25, 2017

^ No, it's not user account type indicator and it should be safe to say it has no ties to it either.

For example:

@rautamiekka
Copy link
Author

rautamiekka commented Jul 11, 2017

Sitrep: I couldn't get any versions to spontaneously repeat the avatar fetch failure, but just very recently after literally a couple dozen folders, 1.5.2 started to fail (only the avatar fetching) and these are what I have left since RipMe GUI repeatedly totally froze after being left minimized for extended periods (which is a problem with the particular computer I were using before reinstalling my main one):

Downloading http://a.deviantart.net/avatars/l/mlp-and-anime-rock.jpg?12
http://a.deviantart.net/avatars/l/mlp-and-anime-rock.jpg?12 : Non-retriable status code 404 while downloading http://a.deviantart.net/avatars/l/mlp-and-anime-rock.jpg?12
Downloading http://a.deviantart.net/avatars/n/andoanimalia.png?3
http://a.deviantart.net/avatars/n/andoanimalia.png?3 : Non-retriable status code 404 while downloading http://a.deviantart.net/avatars/n/andoanimalia.png?3
Downloading http://a.deviantart.net/avatars/h/thepossumface.png
http://a.deviantart.net/avatars/h/thepossumface.png : Non-retriable status code 404 while downloading http://a.deviantart.net/avatars/h/thepossumface.png
Downloading http://a.deviantart.net/avatars/a/karpy96.png?3
http://a.deviantart.net/avatars/a/karpy96.png?3 : Non-retriable status code 404 while downloading http://a.deviantart.net/avatars/a/karpy96.png?3

It uses the username's 2nd letter for the first subfolder, doesn't use the 2nd subfolder at all, and uses JPG, PNG or GIF (not seen in this output) for the format. This output is the first when I see RipMe using other than GIF for the avatar file format.

@rautamiekka
Copy link
Author

rautamiekka commented Aug 1, 2017

This thing gets more complicated:

Indeed, there are users with an username of a single character, like

So for some reason at least 1 user, who's been offline for 300 weeks, still has an JPG avatar with a trailing integer while the other has a GIF without the integer but offline period is a secret, but it's obvious he's been offline for really long too.

So when your username is only 1 character long, DeviantArt uses that one character for the folder and the username with an extension for the filename. Otherwise same but the first 2 characters of the username for the 2 folders.

There are other users' avatars on almost every page, so using a RegEx to catch just the target user's is impossible, therefore it's best to construct the link in app.

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

No branches or pull requests

2 participants