nonamethanks
e7584c7e0a
Nicoseiga: normalize oekaki links
2022-06-04 22:57:54 +02:00
evazion
c07b099bf8
Fix #5152 : Nicovideo video urls getting bad_source.
2022-05-03 03:59:15 -05:00
evazion
23b8350320
sources: add image_url?, page_url?, and profile_url? methods.
...
Add methods to Source::URL for determining whether a URL is an image
URL, a page URL, or a profile URL.
Also add more source URL tests and fix various URL parsing bugs.
2022-05-01 21:01:36 -05:00
nonamethanks
e1b9166a56
Sources: do not use an empty else in case blocks
2022-04-22 03:53:18 +02:00
evazion
5941c47b79
nicoseiga: support a few more url types.
2022-03-23 23:38:06 -05:00
evazion
c07c5ea594
nicoseiga: fix page_url method not to return seiga.nicovideo.jp/image/source/:id urls.
...
Fix the page_url method not to return URLs like this:
https://seiga.nicovideo.jp/image/source/8017978 (page: https://seiga.nicovideo.jp/watch/mg310193 )
These are direct image URLs, not page URLs. It's not generally possible
to get to the page URL from an image URL like this.
This fixes it so that we don't incorrectly set the source of NicoSeiga
uploads to the image URL.
2022-03-23 23:38:06 -05:00
evazion
ded03df1ff
tests: fix more broken tests.
2022-03-15 05:14:56 -05:00
evazion
133c45ee29
sources: parse more profile url formats.
...
Add support for parsing these URL formats:
* https://www.artstation.com/felipecartin/profile
* https://www.deviantart.com/nlpsllp/gallery
* https://fantia.jp/asanagi
* https://www.lofter.com/front/blog/home-page/noshiqian
* https://www.lofter.com/app/xiaokonggedmx
* https://www.lofter.com/blog/semblance
* https://q.nicovideo.jp/users/18700356
* https://dic.nicovideo.jp/u/11141663
* https://3d.nicovideo.jp/users/109584
* https://3d.nicovideo.jp/u/siobi
* https://game.nicovideo.jp/atsumaru/users/7757217
* https://www.pixiv.net/user/13569921/series/81967
* https://pixiv.cc/zerousagi/
* https://www.plurk.com/u/ddks2923
* https://www.plurk.com/m/u/leiy1225
* https://www.plurk.com/s/u/salmonroe13
* https://www.plurk.com/RSSSww/invite/4
* https://skeb.jp/@okku_oxn/works
* https://www.tumblr.com/blog/view/artofelaineho/187614935612
* https://www.tumblr.com/blog/view/artofelaineho
* https://www.tumblr.com/blog/artofelaineho
* https://www.tumblr.com/dashboard/blog/dankwartart
* https://rosarrie.tumblr.com/archive
* https://whereisnovember.tumblr.com/tagged/art
* https://twitpic.com/photos/Type10TK
* https://www.weibo.com/detail/4676597657371957
* https://www.weibo.com/u/5957640693/home?wvr=5
* https://www.weibo.com/lvxiuzi0/home
2022-03-15 00:49:54 -05:00
evazion
9343f7c912
Source::URL: add profile_url method.
...
Add a method for converting a source URL into a profile URL. This will
be used for normalizing profile URLs in artist entries.
Also add the ability to parse a few more profile URL formats.
2022-03-13 03:54:17 -05:00
evazion
43a665a66d
sources: factor out Source::URL::NicoSeiga.
2022-03-10 04:53:51 -06:00