evazion
628341f7f0
Fix #3969 : Translated tags should ignore artist tags.
2018-11-04 17:07:35 -06:00
evazion
0152cbe39e
moebooru: fix delegation to nil strategy (fixup for 5cf6a43).
2018-11-04 15:24:22 -06:00
evazion
5cf6a43918
sources: fix sources sometimes choosing wrong strategy ( fix #3968 )
...
Fix sources choosing the wrong strategy when the referer belongs to a
different site (for example, when uploading a twitter post with a pixiv
referer).
* Fix `match?` to only consider the main url, not the referer.
* Change `match?` to match against a list of domains given by the `domains` method.
* Change `match?` to an instance method.
2018-11-04 13:00:17 -06:00
Albert Yi
9cfbda64bf
fixes #3967
2018-11-02 14:21:41 -07:00
r888888888
e060236fb7
add exception for direct links to pixiv fanbox images
2018-10-20 23:58:19 -07:00
Albert Yi
a85f3773e3
fix nil commentary case for pixiv strategy #3948
2018-10-12 14:35:44 -07:00
evazion
16b1b72da5
tumblr: fix video urls not being recognized.
2018-10-09 12:44:59 -05:00
evazion
184a5ebf3e
tumblr: fix _640 images not being recognized ( #3944 ).
...
Fixes _640 images not being matched by the IMAGE regex and therefore not
being rewritten to the largest size.
2018-10-09 12:44:59 -05:00
evazion
d874c68419
tumblr: fix image_urls when api data is unavailable.
2018-10-09 12:44:59 -05:00
evazion
b0d7d90103
tumblr: extract info from url when api data is unavailable.
...
Derive the artist name / profile url / page url from the source URLs when
the API response is unavailable because the Tumblr post was deleted.
This fixes the artist finder to work on bad_tumblr_id posts.
2018-10-09 12:44:59 -05:00
evazion
0c31a5d6a9
tumblr: don't fail when api data is unavailable ( #3948 ).
...
The api data is unavailable when the work is deleted (bad_tumblr_id), or
when the source is a direct image url with no page referer.
2018-10-09 12:44:59 -05:00
evazion
4c55c809b0
tumblr: don't fail when api key isn't configured.
2018-10-09 12:44:59 -05:00
evazion
8aed1e19b9
tumblr: remove obsolete cdn rewrite rule.
...
This cdn is no longer used by tumblr.
2018-10-09 12:44:59 -05:00
evazion
c8d538f618
moebooru: delegate to substrategy based on post source ( #3911 ).
...
If the yande.re or konachan.com post has a source from a supported site,
for example Pixiv or Twitter, then delegate the artist and commentary
lookup to that substrategy.
Only do this for sources from recognized sites, not the null strategy.
2018-10-06 14:27:49 -05:00
evazion
e5a4193dd4
moebooru: support batch bookmarklet previews ( #3911 ).
2018-10-06 00:58:22 -05:00
evazion
864349dc7b
moebooru: fetch tags ( #3911 ).
2018-10-06 00:58:22 -05:00
evazion
7eee77d520
moebooru: proxy images to avoid hotlink protection ( #3911 ).
...
Fix image previews being broken on the upload page due to yande.re not
allowing hotlinking of images.
2018-10-06 00:58:22 -05:00
Albert Yi
6a375d04e0
fix indentation
2018-09-27 16:58:22 -07:00
evazion
d9063a9f2a
nijie: support preview urls ( #3919 ).
2018-09-24 17:08:37 -05:00
evazion
52704ef6cd
nijie: take artist id from url when possible ( #3919 )
...
Fixes the artist finder to work on Nijie posts that have been deleted.
2018-09-23 20:08:14 -05:00
evazion
5525bbe1ca
nijie: normalize all thumbnail urls ( #3919 ).
2018-09-23 20:08:14 -05:00
evazion
d294514dc0
nijie: don't crash on invalid urls or deleted works ( #3919 ).
2018-09-23 20:08:14 -05:00
evazion
b6228505aa
nijie: fix page_url method.
...
The id in a bare image url is the member id, not the illust id.
2018-09-23 20:08:13 -05:00
evazion
39f9e01b13
nicoseiga: fix canonical_url to use the image url.
2018-09-22 11:07:18 -05:00
evazion
09a8198979
/artists: add wildcard, regex search to url field ( #3900 )
...
Allow searching the URL field by regex or by wildcard.
If the query looks like `/twitter/` do a regex search, otherwise if it
looks like `http://www.twitter.com/ *` do a wildcard search, otherwise if
it looks like an url do an artist finder search, lastly if it looks like
`twitter` do a `*twitter*` search.
2018-09-21 21:19:01 -05:00
evazion
958a9f505b
moebooru: rewrite sample urls + support bookmarklet on html page.
...
* Fixes #2942 : Add Moebooru Rewrite for Sample Images.
* Addresses #3911 : Improve Moebooru support.
2018-09-19 23:32:21 -05:00
evazion
4a99cb098f
moebooru: use the image url as the canonical url.
2018-09-16 21:00:11 -05:00
evazion
d9ce953752
Fix #3906 : Moebooru strategy raises NotImplementedError.
2018-09-16 21:00:11 -05:00
evazion
f135a7c064
twitter: normalize canonical urls.
...
Normalize http://mobile.twitter.com to http://twitter.com in canonical urls.
2018-09-16 15:03:47 -05:00
evazion
bd47641601
twitter: don't fail when api key isn't configured.
2018-09-16 15:03:47 -05:00
evazion
325120ee51
twitter: fix parsing of the artist name from the url.
...
Fixes URLs like https://twitter.com/intent/user?user_id=123 being
incorrectly normalized to http://twitter.com/intent/ in artist entries.
Also fixes the artist name to be taken from the url when it can't be
obtained from the api (when the tweet is deleted).
2018-09-16 15:03:23 -05:00
Albert Yi
f487b2a2c6
Merge pull request #3889 from evazion/fix-replace-artist-finder
...
Cleanup artist finder
2018-09-12 11:44:42 -07:00
evazion
fbd5f6b7f2
pixiv: fix preview_urls for ugoiras ( #3891 ).
2018-09-12 00:43:10 -05:00
evazion
37fc215d75
pixiv: fix preview_urls to use correct url ( #3891 ).
2018-09-11 23:55:46 -05:00
evazion
583f8457f0
artists: clean up artist finding logic.
...
Rename Artist#find_all_by_url to url_matches and drop previous
url_matches method, along with find_artists and search_for_profile.
Previously find_artists tried to lookup the url, referer url, and profile
url in turn until an artist match was found. This was wasteful, because
the source strategy already knows which url to lookup (usually the profile
url). If that url doesn't find a match, then the artist doesn't exist.
2018-09-11 20:14:46 -05:00
Albert Yi
a5df178bcc
Merge pull request #3886 from r888888888/source-api-caching
...
cache api clients
2018-09-11 17:34:25 -07:00
Albert Yi
4972c998f8
rely on preview urls if available for gallery
2018-09-11 15:06:12 -07:00
Albert Yi
266c7c0d5b
cache api clients
2018-09-11 14:19:17 -07:00
Albert Yi
f16c3a3f40
fix nijie specs
2018-09-11 13:27:00 -07:00
evazion
9a980367f6
twitter: normalize artist commentaries to nfkc ( #3719 )
...
Fixes hashtags not being interpreted when the author uses a fullwidth
number sign (#, U+FF03).
ref: https://github.com/r888888888/danbooru/issues/3719#issuecomment-419535610
2018-09-10 21:45:50 -05:00
evazion
bfed323988
deviantart: fix page_url for when api data is unavailable.
...
The api data is unavailable when we can't scrape the uuid, either
because the work is deleted or because the work is actually a sta.sh
upload and we weren't given the sta.sh page in the referer url.
2018-09-10 19:26:53 -05:00
evazion
c9300cc54e
sta.sh: add tests + docs.
2018-09-10 19:26:53 -05:00
evazion
7d5d098636
Fix #3877 : Add sta.sh strategy.
...
Co-authored-by: lllusion3469 <31420484+lllusion3469@users.noreply.github.com >
2018-09-10 19:26:47 -05:00
evazion
cb2d85d925
twitter: fix profile_url for twitter.com/i/web/status/:id urls.
...
Fix profile_url returning nil for https://twitter.com/i/web/status/943446161586733056 .
2018-09-09 19:48:34 -05:00
evazion
b924c2bb9c
nijie: fix artist url normalization.
2018-09-09 13:17:52 -05:00
Albert Yi
b1a9337897
Merge pull request #3875 from evazion/fix-3873
...
Fix #3873 : Batch bookmarklet for tumblr reports wrong posts as already uploaded
2018-09-07 14:15:24 -07:00
evazion
a67edb8783
deviantart: fix artist finder for artist names with underscores.
...
Fix the artist finder for urls like this:
https://orig00.deviantart.net/4274/f/2010/230/8/a/pkmn_king_and_queen_by_mikoto_chan.jpg
that don't contain a deviantart id but do contain the artist name.
2018-09-07 12:23:48 -05:00
evazion
610391205f
deviantart: fix artist finder for profile urls missing the 'www'.
...
Fix the artist finder to work when the profile url in the artist entry
is missing the 'www'. Example:
https://deviantart.com/noizave
https://www.deviantart.com/noizave
2018-09-07 11:36:48 -05:00
evazion
950fcdb7b2
uploads: add new source:<url> dupe check ( fix #3873 )
...
* On the /uploads/new page, instead of just showing a "This post has
probably already been uploaded" message, show the actual thumbnails of
posts having the same source as what the user is trying to upload.
* Move the iqdb results section up top, beside the related posts section.
2018-09-06 20:43:20 -05:00
evazion
5c457fbe51
pixiv: remove obsolete edgesuite.net rewrite rule.
...
This CDN hasn't been seen for several years.
ref: https://danbooru.donmai.us/forum_topics/10766
2018-09-04 18:15:21 -05:00