Commit Graph

11 Commits

Author SHA1 Message Date
evazion
f52dc9e2ad tinami: fix 'http already memoized' warning. 2022-03-21 00:37:55 -05:00
evazion
71f42d67a7 tinami: return nothing if getting the full image fails.
Fix to make sure `image_urls` returns an empty array instead of `[nil]`
if grabbing the full image URL fails for whatever reason.
2022-03-19 23:42:34 -05:00
evazion
7f58cfbe5e tinami: get the full image.
Support grabbing the full image for Tinami uploads, rather than the sample.

Getting the full image requires making a request like this:

    curl -X POST \
    -H 'Referer: https://www.tinami.com/' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -H 'Cookie: Tinami2SESSID=<redacted>;' \
    --data-raw 'action_view_original=true&cont_id=1087268&ethna_csrf=<redacted>' \
    https://www.tinami.com/view/1087268

Then scraping the <img> tag from the resulting HTML page.

If the post has multiple images, then we need to scrape and pass the
`sub_id` of the image too.

Fixes #2818.
2022-03-19 23:22:09 -05:00
evazion
01b683798e sources: add Tinami support. 2022-03-19 00:50:36 -05:00
albert
17881068e1 * Removed Pixa/Tinami sources
* Upgraded to Rails 3.2.3
* Fixed tests
2012-06-01 19:22:58 -04:00
albert
19add9aa4e refactored sources 2011-09-29 12:55:15 -04:00
albert
600fe67444 renamed some flavor text 2011-09-28 18:02:41 -04:00
albert
218096a5c4 moved source passwords into config 2011-09-26 17:32:52 -04:00
albert
dc31e74809 added tinami support 2011-09-26 17:30:35 -04:00
albert
284141aace refactored source code, work on pixiv integration 2011-09-26 16:47:22 -04:00
albert
a1657366c1 renamed artsiteproxy to sources 2011-09-26 12:54:42 -04:00