Allowing for -mobile gfycat links, simplified URL patterns
This commit is contained in:
parent
160ee9711d
commit
a0e01c8837
|
@ -76,7 +76,6 @@ function fetchSavePosts(userPosts, ep) {
|
||||||
|
|
||||||
async function initApp() {
|
async function initApp() {
|
||||||
try {
|
try {
|
||||||
klsjdflkjs
|
|
||||||
const userPosts = await getCompleteUserPosts();
|
const userPosts = await getCompleteUserPosts();
|
||||||
const ep = new exiftool.ExiftoolProcess(exiftoolBin);
|
const ep = new exiftool.ExiftoolProcess(exiftoolBin);
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,7 @@ const hosts = [{
|
||||||
}, {
|
}, {
|
||||||
method: 'imgurImage',
|
method: 'imgurImage',
|
||||||
label: 'imgur',
|
label: 'imgur',
|
||||||
pattern: new UrlPattern('http(s)\\://(:subdomain.)imgur.com/:id_d(.:ext)(?*)'),
|
pattern: new UrlPattern('http(s)\\://(:subdomain.)imgur.com/(:id_d)(:id)(.:ext)(?*)'),
|
||||||
}, {
|
|
||||||
method: 'imgurImage',
|
|
||||||
label: 'imgur',
|
|
||||||
pattern: new UrlPattern('http(s)\\://(:subdomain.)imgur.com/:id(.:ext)(?*)'),
|
|
||||||
}, {
|
}, {
|
||||||
method: 'imgurAlbum',
|
method: 'imgurAlbum',
|
||||||
label: 'imgur',
|
label: 'imgur',
|
||||||
|
@ -45,11 +41,7 @@ const hosts = [{
|
||||||
}, {
|
}, {
|
||||||
method: 'gfycat',
|
method: 'gfycat',
|
||||||
label: 'gfycat',
|
label: 'gfycat',
|
||||||
pattern: new UrlPattern('http(s)\\://(:server.)gfycat.com/:id(-size_restricted.gif)'),
|
pattern: new UrlPattern('http(s)\\://(:server.)gfycat.com/(gifs/detail/)(:id-mobile)(:id-size_restricted)(:id)(.:ext)'),
|
||||||
}, {
|
|
||||||
method: 'gfycat',
|
|
||||||
label: 'gfycat',
|
|
||||||
pattern: new UrlPattern('http(s)\\://(:server.)gfycat.com/(gifs/detail/):id(.:ext)'),
|
|
||||||
}, {
|
}, {
|
||||||
method: 'eroshareAlbum',
|
method: 'eroshareAlbum',
|
||||||
label: 'eroshare',
|
label: 'eroshare',
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
async function imgurImage(post) {
|
async function imgurImage(post) {
|
||||||
|
console.log(post.host);
|
||||||
|
|
||||||
const res = await fetch(`https://imgur.com/${post.host.id}`);
|
const res = await fetch(`https://imgur.com/${post.host.id}`);
|
||||||
const html = await res.text();
|
const html = await res.text();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue