Kagami / tistore

:camera: Tistory photo grabber
24 stars 10 forks source link

Program no longer work #1

Closed ApinkLoyalFan closed 6 years ago

ApinkLoyalFan commented 6 years ago

Hello there, there is recent changes by tistory and the program is no longer work to download original pictures

Can you fix it ?

Thank you

Silenciuse commented 6 years ago

Hi, the program no longer works due to tistory changing how their URLs work. The URLs are now formatted as: https://t1.daumcdn.net/cfile/tistory/996431505A4B6C1C38

I've discovered that to get the original image from these new URLs, you need to add "?original" to the end of the URL, instead of the previous method of changing "image" to "original".

Example: https://t1.daumcdn.net/cfile/tistory/996431505A4B6C1C38?original

I would also greatly appreciate an update to this program because it worked very well and is the only tistory downloader that exists.

Thanks

Kagami commented 6 years ago

Hi. Thanks for the report. I will look into it.

Kagami commented 6 years ago

t1.daumcdn.net links don't have Content-Disposition header set, it needs to be parsed from the page. Might be done but requires some architecture changes. Also links import/export won't work properly (unless added another field for filename, but old lists won't work anymore; though I'm not sure someone use that feature).

It's possible to get old cfile.uf.tistory.com links with propert Content-Disposition from xxx.tistory.com/sync/local/123 pages, but that's not documented anywhere and might be broken in future as well. Though format seems to be quite stable, it's probably just some kind of undocumented API response which doesn't require auth.

Lastly the proper way to parse image links should be via /apis/post/list and /apis/post/read API requests but it requires registration. I wasn't able to register at tistory because you need invitation for that. Also I can't find information about API rate limits so it might be quite unreliable to hardcode single access token.

The second option seems to be the simplest one, at least as a quick fix. Any thoughts?

Kagami commented 6 years ago

Hm, actually there is Content-Disposition header for https://t1.daumcdn.net/...?original types of links, just needed to set special option for aria2.

I think option 1 is better now but there are disadvantages too:

Kagami commented 6 years ago

Released 0.3.0. Please try it.