WFDownloader script to download from youpic.com

WFDownloader script to download from youpic.com. Supports both image and user pages.
mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
940
Indexable
Never
@onlyMatchingUrlsAllowed
@label [id=1, label="User page", urlregex=#(/photographer|://[^/]+?)/[^/]+/($|\?mode=latest)#]
fetch via customhandler 'infinite_scroll' with [
    'crawlDelay' = '5',
    'templateUrl' = 'https://api3.youpic.com/user/{{userId}}/newest?count=28&cursor={{cursorPos}}&direction=from&context_id=0',
    'userId' = '$htmlval: #"User":\{"(?<val>\d+)":#',
    'cursorPos' = '',
    'next.cursorPos' = '$jsonval: $data->cursor',
    'targetVals' = '$jsonval:$data->resource->Image[]', 
    'targetValsAreObjects' = 'true',
    'object.id' = '$jsonval:$data->id',
    'object.title' = '$jsonval:$data->title',
    'object.cdn' = '$jsonval:$data->url->url',
    'object.file' = '$jsonval:$data->url->file',
    'object.url' = '$jsonval:$data->url->file',
    'object.rewriteUrl' = '{{cdn}}/huge/{{placeholder}}',
    'object.customName' = '{{id}} {{title}}.png'
];
 or
@label [id=3, label="Photo page", urlregex=#/image/#] 
goto '.Browser-Image-Content' fetch first 1 img_src indirectly, customname pagetitle file extension from url { 
    fetch rewrite url #(.+?)/large/(.+)# as $1'/huge/'$2
};