forked from DebaucheryLibrarian/traxxx
Added image processing options to media module. Cropping Killergram avatars. Overwriting images when --force is used.
This commit is contained in:
@@ -71,6 +71,18 @@ async function fetchActorReleases({ query }, url, remainingPages, actorName, acc
|
||||
async function scrapeProfile({ query, window }, actorName, url, include) {
|
||||
const profile = {};
|
||||
|
||||
profile.avatar = {
|
||||
src: `http://thumbs.killergram.com/models/${encodeURI(actorName)}/modelprofilethumb.jpg`,
|
||||
process: {
|
||||
crop: {
|
||||
top: 4,
|
||||
left: 4,
|
||||
width: 289,
|
||||
height: 125,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
if (include.releases) {
|
||||
const availablePages = query.all('.pageboxdropdown option', 'value');
|
||||
profile.releases = await fetchActorReleases(qu.init(query.q('#episodes > table'), window), url, availablePages.slice(1), actorName);
|
||||
|
||||
Reference in New Issue
Block a user