Commit Graph

80 Commits

Author SHA1 Message Date
r888888888
d124ff8128 fix case when fetching pixiv sources when illust_id param comes before mode 2017-08-23 17:50:33 -07:00
evazion
c270954991 Fix #3258: Fetch source data broken for https://i.pximg.net/* ugoiras. 2017-08-06 17:23:29 -05:00
evazion
80e8c9d174 strategies/pixiv.rb: removed unused methods (#3206).
The page count and the moniker are now obtained from the API.
2017-07-26 18:17:04 -05: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
94e48aa6f3 pixiv: convert commentary to dtext.
Convert pixiv links to dtext in this manner:

* https://www.pixiv.net/member_illust.php?mode=medium&illust_id=1234
  => pixiv #1234 "»":[/posts?tags=pixiv:1234]

* https://www.pixiv.net/member.php?id=1234
  => "user/1234":[https://www.pixiv.net/member.php?id=1234] "»":[/artists?search[url_matches]=https://www.pixiv.net/member.php?id=1234]
2017-06-16 18:42:37 -05:00
Albert Yi
2f1faf3c38 Merge pull request #3060 from evazion/fix-3048
Fix #3048: Artist Lookup Failing Due to Changing Usernames
2017-05-15 16:33:53 -07:00
Albert Yi
7d2e1f871b Merge pull request #3056 from evazion/fix-3054
Fix #3054: Artist link broken on Post Upload page
2017-05-15 16:17:26 -07:00
evazion
eac827973b Normalize pixiv artist urls to pixiv member page (fix #3048). 2017-05-15 14:12:08 -05:00
evazion
6ee3b2635a Fix returning incorrect pixiv profile url (fixes #3054). 2017-05-14 22:00:06 -05:00
evazion
61a37a09cc Fix translated tags for pixiv (fix #3046).
Translated tags expects `tags` to be an array of `[tag_name, search_link]` pairs.
2017-05-13 19:17:33 -05:00
r888888888
7ae18d1068 bug fix for source pixiv 2017-05-12 16:42:25 -07:00
r888888888
bcec293efe pull additional data from pixiv api (fixes #3042) 2017-05-12 11:17:31 -07:00
evazion
b2f62482a1 Remove artist commentary handling from download rewrite strategies. 2017-05-10 18:01:51 -05:00
evazion
4b138be6b9 Rewrite i.pximg.net manga gallery samples. 2017-04-03 17:17:22 -05:00
r888888888
54f0474d49 fixes #2930: Support new Pixiv image hostname (i.pximg.net) 2017-03-27 15:53:32 -07:00
evazion
21e76d55e6 Remove extraneous byte-ordering marks. 2017-02-28 19:01:10 -06:00
Albert Yi
3ad639521f fixes #2805: Improve nico seiga support 2016-12-27 16:11:22 -08:00
evazion
838d6f6eea Fix #2460: Uploading pixiv user's background image throws error.
Fix exception when uploading these types of URLs:

* http://img12.pixiv.net/profile/rapattu/119950.jpg
* http://i2.pixiv.net/img130/profile/minono_aki/8733472.jpg
* http://i2.pixiv.net/img20/img/a-park/novel/3607898.jpg
* http://i1.pixiv.net/novel-cover-original/img/2016/11/03/20/10/58/7436075_f75af69f3eacd1656d3733c72aa959cf.jpg
* http://i1.pixiv.net/background/img/2016/05/17/12/05/48/2074388_d4ac52034f7ca0af3e083d59fde7e97f.jpg

Skip rewriting sources that don't have illust IDs to avoid this
exception. Also fix `tags` so that it doesn't blow up when fetching
source data for these types of sources.
2016-12-04 02:04:44 -06:00
evazion
5302b804f1 Fix #2779: Erroneous pixiv_id parsed for novel/background/profile images 2016-12-04 02:04:44 -06:00
Albert Yi
a862c5bf03 fixes #2746: Uploading from touch.pixiv.net broken 2016-10-31 12:22:32 -07:00
evazion
d38e83cd00 Refactor Post#parse_pixiv_id to use illust_id_from_url (fix #2695).
* Make illust_id_from_url a public class method instead of a protected
  instance method so that Post#parse_pixiv_id can use it.
* Also make illust_id_from_url swallow the exception that
  illust_id_from_url! throws so that parse_pixiv_id can use it.
2016-10-03 02:29:45 +00:00
r888888888
dbf1a38550 fixes #2608: Batch upload strategy for "book mode" pixiv manga 2016-06-14 11:49:57 -07:00
r888888888
58aa5c6d66 fix tests 2016-05-28 14:08:44 -07:00
Toks
0a5f1b53ba #2426 refactor to use predetermined referer 2015-07-05 11:02:01 -04:00
r888888888
fd74f860ee potential fix for #2404 2015-06-10 17:28:51 -07:00
Toks
854d587373 Fix upload source fetcher fetching from wrong work page for all sites
e.g. If you were on an html work page on pixiv, clicked a link to a
different html work page on pixiv, and then clicked the bookmarklet,
then it used to fetch the source from the FIRST work you were on instead
of the second.
2015-06-03 20:59:24 -04:00
r888888888
2ddc93723c fixes #2327 2015-06-02 19:20:09 -07:00
Toks
0ac21b1623 Fix pixiv batch not working on old pixiv works 2015-05-23 12:00:35 -04:00
r888888888
9bdc0116bf fix pixiv tests 2015-05-14 16:50:24 -07:00
r888888888
ac6d1fa498 bug fix with pixiv api 2015-05-11 15:53:45 -07:00
r888888888
17cc8735ad first cut implementation at using public pixiv api 2015-05-11 15:19:05 -07:00
r888888888
721df95832 remove references to spapi 2015-05-11 10:57:41 -07:00
r888888888
5457d9ed4e temporarily disable pixiv sapi calls 2015-05-11 10:28:52 -07:00
Toks
6faa6305dd Autodelete phpsessid
fixes #2382
2015-05-08 13:30:26 -04:00
r888888888
2d266fc0b6 uploads/batch now supports pixiv 2015-03-15 13:56:16 -07:00
r888888888
c92c32ecda fix tests 2015-02-15 12:23:53 -08:00
r888888888
7175df2099 fix for Pixiv#get_image_url_from_page 2014-12-12 12:33:52 -08:00
Toks
6d565d9f87 Fix regression with pixiv manga uploads 2014-12-11 13:21:43 -05:00
r888888888
029202068d fix Pixiv#get_image_url_from_page 2014-12-11 10:05:59 -08:00
r888888888
e8a8999a73 fix class error 2014-12-04 17:32:19 -08:00
r888888888
d7f044e18b loosen constraints on pixiv img server regexp 2014-12-03 13:39:47 -08:00
evazion
57bb51621e Add debugger gem.
Fix random VCR failures in Pixiv tests.

Sometimes tests randomly fail because the PHPSESSID they use in their
HTTP requests to Pixiv is different than the one that was originally
recorded by VCR. This causes VCR to complain that the requests don't
match.

This is caused by the PHPSESSID being globally cached in Memcache.
Depending on the order the tests run in (which is random), one set of
tests can use a PHPSESSID that was recorded for a /different/ set of
tests.

Improve Pixiv URL matching.

* Allow URLs that are missing the http:// part. These are sometimes seen
  in artist entries.
* Ignore URLs from random Pixiv domains such as dic.pixiv.net,
  blog.pixiv.net, etc. These are also sometimes in artist entries.

Improve normalize_for_artist_finder! URL matching.

* Normalize www.pixiv.net/stacc/username URLs.
* Correctly normalize URLs that are missing the illust ID part on the end
  (i.e. http://i2.pixiv.net/img04/img/syounen_no_uta/). These are common
  in artist entries.

Match URLs strictly when normalizing for artist entries.

Only normalize Pixiv URLs that strictly match a known format. Pass any
unrecognized URLs through without attempting to normalize them, just to
be safe.

Normalize URLs when saving artist entries.
2014-12-03 13:16:05 -08:00
Toks
fc0328b9df fixes #2317 2014-12-02 16:02:21 -05:00
r888888888
16f9a61d63 fixes #2299 2014-10-29 15:14:17 -07:00
r888888888
8d4c9d7955 fix pixiv tests 2014-10-22 17:22:36 -07:00
Toks
5f9ce7ee47 Fix get_image_url_from_page call 2014-10-19 02:30:02 -07:00
r888888888
4c73fb9f79 add ugoira support in view 2014-10-19 02:30:02 -07:00
r888888888
3bb06c2be4 integrate ugoiras into zip+webm+preview 2014-10-19 02:30:02 -07:00
r888888888
fb2219d4ac integrate ugoira converted into upload flow 2014-10-19 02:30:01 -07:00
evazion
c75d2d208e normalize_for_artist_finder!: Don't crash on bad URLs
If we can't normalize the URL (because of bad IDs, it's malformed, or
the HTML page changed), just return the unnormalized URL.
2014-10-05 14:11:32 -05:00