From 5b886b39178ef7e0e446ae855f2e46af00aed2df Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 15 Jul 2020 05:12:29 +0200 Subject: [PATCH] Improved actor extraction for fcuk scraper. Changed 'copyright' to 'credit'. Redused entity page favicon size. --- assets/components/actors/actor.vue | 2 +- assets/components/actors/photos.vue | 4 ++-- assets/components/entities/entity.vue | 7 +++++-- assets/js/ui/actions.js | 4 ++-- public/img/logos/fcuk/lazy/favicon.png | Bin 0 -> 1158 bytes public/img/logos/fcuk/thumbs/favicon.png | Bin 0 -> 1158 bytes seeds/00_tags.js | 1 + src/scrapers/fcuk.js | 10 +++++++--- 8 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 public/img/logos/fcuk/lazy/favicon.png create mode 100644 public/img/logos/fcuk/thumbs/favicon.png diff --git a/assets/components/actors/actor.vue b/assets/components/actors/actor.vue index dc95471b..25419e9e 100644 --- a/assets/components/actors/actor.vue +++ b/assets/components/actors/actor.vue @@ -43,7 +43,7 @@ > diff --git a/assets/components/actors/photos.vue b/assets/components/actors/photos.vue index 61a59210..520d7966 100644 --- a/assets/components/actors/photos.vue +++ b/assets/components/actors/photos.vue @@ -18,7 +18,7 @@ :src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`" :data-src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`" :data-loading="sfw ? `/img/${actor.avatar.sfw.lazy}` : `/media/${actor.avatar.lazy}`" - :title="actor.avatar.copyright && `© ${actor.avatar.copyright}`" + :title="actor.avatar.credit && `© ${actor.avatar.credit}`" class="avatar photo" @load="$parent.$emit('load')" > @@ -36,7 +36,7 @@ :src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`" :data-src="sfw ? `/img/${photo.sfw.thumbnail}` : `/media/${photo.thumbnail}`" :data-loading="sfw ? `/img/${photo.sfw.lazy}` : `/media/${photo.lazy}`" - :title="`© ${photo.copyright || photo.entity.name}`" + :title="`© ${photo.credit || photo.entity.name}`" class="photo" @load="$parent.$emit('load')" > diff --git a/assets/components/entities/entity.vue b/assets/components/entities/entity.vue index d5dbe297..0efc4180 100644 --- a/assets/components/entities/entity.vue +++ b/assets/components/entities/entity.vue @@ -215,11 +215,14 @@ export default { height: 2.5rem; } -.logo-parent, -.favicon { +.logo-parent { height: 1.5rem; } +.favicon { + height: 1rem; +} + .name { color: var(--text-light); display: flex; diff --git a/assets/js/ui/actions.js b/assets/js/ui/actions.js index db5a9e6f..7c427c66 100644 --- a/assets/js/ui/actions.js +++ b/assets/js/ui/actions.js @@ -116,7 +116,7 @@ function initUiActions(_store, _router) { thumbnail lazy comment - copyright + credit } birthCountry: countryByBirthCountryAlpha2 { alpha2 @@ -135,7 +135,7 @@ function initUiActions(_store, _router) { thumbnail lazy comment - copyright + credit } birthCountry: countryByBirthCountryAlpha2 { alpha2 diff --git a/public/img/logos/fcuk/lazy/favicon.png b/public/img/logos/fcuk/lazy/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..7fb159435f3883d938101fef1dff52c94e2cd290 GIT binary patch literal 1158 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UOiAAEE)4(M`_JqL@;D1TB8wRq z^pruEv0|xx8BmbD#M9T6{RulilQEL7=AuENVYKb^GLQY)zWdu& zCN?EjG=-_=x*af4%&n4?=GtVabVAY9k7Yym-Q0b84QuwvsCdkp+QVbP%~8-=zu{dd z`{F%~Za3bYsmplT{(bhQu8D37FJ3kIc5RQY^W%aSMH6QIY)N?hl*4B8XWJSXZu{#R z8`R{V%OqReQhva?|CQ`^^%~)#8kMB_nG3pRhO>TXIRC@^`{e~$D|F9ok$tndfN_o3 zoV(oTq_^LdQg2_~xo`iax|6FGP4BqC7m?@xK$%5v-<+17aOvJx0keL*_k%7q8vF44h`BYfnzhXH~1S{(R^5DwnnAT&_meBrUMDTD;iZNlSjF(sa3=Uxx9I zmrb=-JCbxc|M;EH7iB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fZzW-ntY7&2BuT zXt1s{PG{+y)lMq!g7#m&EBEd8=EMJr<6FMVcgD5O_{XqIQbB2P?<7fJWJY+pIEHu} zzdOa(i`h}2b^p7P5CP{!P1jG#eqot+XzPPhQx|Yw&nss6$aM4Nsb2Pi7>R=#myNIL zT{8T9*>w4hQ#Ct$!8x;d;QiP%SaWRiRhsCAhvQ)m`J8z+}oO@^+18jA;8I zE&tfYptVuvkqkvToYUlX$Gv1aw_jAtPoZYQ#L3F7^H~p0tYqqSJj$_)M}j4Tch=dU zwfm0kIl2DB$t^aUqJ-irxz~K?`fRyh`{cUl7nk`>-X9J5>m@WjVV~$}EpX5NXR?XMvkl*-KiKnQ%3G#LlT(sXAM<24 zGc>AcOU_72W|0jFvd`^3$TY!N*X2p4_c22z){>j6uA1-LZC`MhwM(8|GqFFI&!Ure zSQ!|+oo>N|q9Hdw zB{QuOw}v^V8ukG-NP}zu=0L0D{DR7&%=C;BhJezfoXlhem;Bts%)D(A4Wog|lwitI zQj3#|G7CyF^Ya+oJ$(Zdl1ejkN^~>x6pDk~oqW { const release = {}; @@ -18,7 +20,10 @@ function scrapeLatestBlog(scenes, channel) { release.description = query.text('p'); release.date = query.date('h5 strong, .videos h3', 'MMM. DD, YYYY', /\w+. \d{2}, \d{4}/); - if (!/\band\b/.test(release.title) && new RegExp(release.title).test(release.description)) { + // remove common patterns so only the name is left + const curatedTitle = release.title.replace(/\b(part \d|\banal|bts)\b/gi, '').trim(); + + if (!/\band\b/.test(curatedTitle) && new RegExp(curatedTitle).test(release.description)) { // scene title is probably the actor name release.actors = [release.title]; } @@ -63,7 +68,7 @@ function scrapeSceneBlog({ query }, url, channel) { release.entryId = new URL(url).pathname.match(/\/scene\/(\d+)\/(\d+)/).slice(1, 3).join('-'); - release.title = query.q('h4 strong, .videos h3', true); + release.title = query.text('h4 strong, .videos h3'); release.description = query.q('#about p, .videos p', true); const actors = query.urls('a[href*="/girl/"]').map(actorUrl => actorUrl.match(/video-([\w\s]+)/)?.[1]).filter(Boolean); @@ -98,7 +103,6 @@ function scrapeScene({ query, html }, url, channel) { }; } - console.log(release); return release; }