Commit Graph

23 Commits

Author SHA1 Message Date
Albert Yi
6839249e9d add logic for persisting pixiv sessions in tests 2018-05-10 13:59:57 -07:00
Albert Yi
5bfadb90c3 add retry for failed pixivapiclient auth calls 2018-05-10 11:22:23 -07:00
Albert Yi
3c894eaf86 increase timeout for pixiv api connections 2018-05-10 09:49:46 -07:00
evazion
0b5ed163fe Fix #3395: fix pixiv API exception when uploading bad pixiv id images.
Fixes an exception when attempting to upload a Pixiv image from a
deleted work. The download strategy tries to fetch the source data in
the course of rewriting the URL, which fails if the work has been
deleted from Pixiv.

Raise a BadIDError and leave the URL as-is (don't rewrite it).
2017-11-21 14:40:39 -06:00
evazion
183a7e07e3 pixiv: fix failbooru when uploading bad pixiv id posts.
Fixes an "incompatible character encodings: UTF-8 and ASCII-8BIT"
exception when uploading a deleted Pixiv post.

Caused by the Pixiv API error message not having the encoding set to UTF-8.
2017-11-21 14:11:59 -06:00
r888888888
a506cf2a1a potential fix for #3321 2017-10-09 14:56:11 -07:00
r888888888
014b9af5f8 fetch ugoiras for batch action #3317 2017-10-03 13:36:56 -07:00
evazion
8125d8e796 Set the default User-Agent sent for outgoing http requests.
* Add a `Danbooru.config.http_headers` config option.

* Refactor various places to use this option instead of setting the user
  agent manually.
2017-07-19 20:25:27 -05:00
evazion
79b21bbca8 Fix failure in Pixiv API call (#3135).
Forgot to send authentication headers with API call.
2017-07-13 15:58:17 -05:00
r888888888
97ce9cafac add httparty option config 2017-07-12 15:52:48 -07:00
r888888888
eb6c5e3af5 switch to httparty 2017-07-12 15:52:48 -07:00
evazion
cc8986641b Fix #3208: Fix translated tag suggestions for Pixiv.
* Only suggest the Danbooru tag with the same name if there is no
  matching wiki other name. Example: if we have the Pixiv tag `Fate` and
  the Danbooru tag `fate_(series)` with other name `fate`, suggest that,
  not the Danbooru tag `fate`.

* Don't suggest tags that are empty or whose wiki is deleted.

* Only split tags on "/" if there are no other matches, and only for Pixiv.

* For Pixiv, only include traditional media tags in tag list, not digital media (Photoshop, SAI).

* Add some tests.
2017-07-09 12:10:30 -05:00
evazion
c638ff2e9c pixiv: fix nil commentary fields to empty string. 2017-06-16 18:42:37 -05:00
r888888888
69fd6e6ca1 fixes #3102 2017-05-31 10:58:47 -07:00
r888888888
b49641f775 fixes #3033 2017-05-09 13:21:21 -07:00
r888888888
4fa2741ed2 include whitecube source/rewrite strategies 2016-09-28 11:24:54 -07:00
r888888888
06ef466e53 revert papi expiry change 2015-08-24 23:38:18 -07:00
r888888888
1eae80a82c change papi token timeout 2015-08-24 22:54:39 -07:00
r888888888
80b4db18d2 reduce pixiv api access token duration 2015-08-24 19:32:08 -07:00
r888888888
2ddc93723c fixes #2327 2015-06-02 19:20:09 -07:00
r888888888
9bdc0116bf fix pixiv tests 2015-05-14 16:50:24 -07:00
r888888888
9d1dd3afca add error handling 2015-05-11 15:48:02 -07:00
r888888888
17cc8735ad first cut implementation at using public pixiv api 2015-05-11 15:19:05 -07:00