^q^
This commit is contained in:
parent
f7296338c9
commit
296d7c6185
|
@ -12,7 +12,7 @@ class Image(object):
|
|||
|
||||
def __init__(self, post_url, date, url, page):
|
||||
self.post_url = post_url
|
||||
self.url = LazyUrl(post_url, lambda _: url, self)
|
||||
self.url = LazyUrl(post_url, lambda _: url.replace('/large/', '/4k/'), self, url)
|
||||
self.page = page
|
||||
name = post_url.split('/')[(-1)]
|
||||
ext = os.path.splitext(url.split('?')[0])[1]
|
||||
|
@ -31,10 +31,11 @@ class Downloader_artstation(Downloader):
|
|||
def init(self):
|
||||
self.url_main = 'https://www.artstation.com/{}'.format(self.id.replace('artstation_', '', 1).replace('/', '/'))
|
||||
|
||||
if '/artwork/' in self.url:
|
||||
if '/artwork/' in self.url or '/projects/' in self.url:
|
||||
pass#raise NotImplementedError('Single post')
|
||||
else:
|
||||
self.url = self.url_main
|
||||
self.print_(self.url)
|
||||
|
||||
# 3849
|
||||
self.session = Session('chrome')
|
||||
|
@ -61,7 +62,7 @@ class Downloader_artstation(Downloader):
|
|||
id = id.split('/')[0]
|
||||
else:
|
||||
type = None
|
||||
if '/artwork/' in self.url:
|
||||
if '/artwork/' in self.url or '/projects/' in self.url:
|
||||
id_art = get_id_art(self.url)
|
||||
imgs = get_imgs_page(id_art, self.session, cw=self.cw)
|
||||
else:
|
||||
|
@ -130,7 +131,7 @@ def get_imgs(id, title, session, type=None, cw=None):
|
|||
|
||||
|
||||
def get_id_art(post_url):
|
||||
return post_url.split('/artwork/')[1].split('/')[0]
|
||||
return post_url.split('/artwork/')[-1].split('/projects/')[-1].split('/')[0].split('?')[0].split('#')[0]
|
||||
|
||||
|
||||
def get_id(url, cw=None):
|
||||
|
|
|
@ -117,6 +117,9 @@ def read_html(url, session, cw):
|
|||
|
||||
def check_error(soup, cw, wait):
|
||||
print_ = get_print(cw)
|
||||
|
||||
if len(soup.html) < 1000: #4014
|
||||
raise errors.LoginRequired(soup.html)
|
||||
|
||||
err = soup.find('div', class_='error-container')
|
||||
if err:
|
||||
|
|
|
@ -3,7 +3,7 @@ import downloader
|
|||
import nndownload
|
||||
from io import BytesIO
|
||||
import ree as re
|
||||
from utils import Downloader, get_print, compatstr, format_filename, clean_title, try_n, LazyUrl, get_abr
|
||||
from utils import Downloader, get_print, compatstr, format_filename, try_n, LazyUrl, get_abr
|
||||
import utils
|
||||
from nico_login import login, logout
|
||||
import ffmpeg
|
||||
|
|
|
@ -74,7 +74,7 @@ class Downloader_sankaku(Downloader):
|
|||
if self.type_sankaku == 'www':
|
||||
id = '[www] ' + self.soup.find('h1', class_='entry-title').text.strip()
|
||||
else:
|
||||
if '/post/' in self.url:
|
||||
if '/post/show/' in self.url:
|
||||
id = get_id(self.url)
|
||||
else:
|
||||
qs = query_url(self.url)
|
||||
|
@ -241,7 +241,7 @@ def get_imgs(url, title=None, cw=None, d=None, types=['img', 'gif', 'video'], se
|
|||
info = {}
|
||||
info['single'] = False
|
||||
|
||||
if '/post/' in url:
|
||||
if '/post/show/' in url:
|
||||
info['single'] = True
|
||||
id = get_id(url)
|
||||
info['imgs'] = [Image(type, id, url, None, cw=cw, d=d)]
|
||||
|
|
|
@ -55,9 +55,6 @@ class Downloader_tiktok(Downloader):
|
|||
self.urls.append(video.url)
|
||||
self.title = clean_title(video.title)
|
||||
|
||||
self.setIcon(video.thumb)
|
||||
|
||||
|
||||
|
||||
class Video(object):
|
||||
_url = None
|
||||
|
@ -80,10 +77,6 @@ class Video(object):
|
|||
ydl = ytdl.YoutubeDL()
|
||||
info = ydl.extract_info(url)
|
||||
|
||||
self.url_thumb = info['thumbnail']
|
||||
self.thumb = BytesIO()
|
||||
downloader.download(self.url_thumb, referer=url, buffer=self.thumb)
|
||||
|
||||
self._url = info['url']
|
||||
|
||||
return self._url
|
||||
|
@ -99,21 +92,20 @@ def read_channel(url, session, cw=None):
|
|||
info['items'] = []
|
||||
sd = {
|
||||
'count_empty': 0,
|
||||
'shown': False,
|
||||
'shown': SHOW,
|
||||
}
|
||||
|
||||
max_pid = get_max_range(cw)
|
||||
|
||||
def f(html, browser=None):
|
||||
soup = Soup(html)
|
||||
if not SHOW:
|
||||
if is_captcha(soup):
|
||||
print('captcha')
|
||||
browser.show()
|
||||
sd['shown'] = True
|
||||
elif sd['shown']:
|
||||
browser.hide()
|
||||
sd['shown'] = False
|
||||
if is_captcha(soup):
|
||||
print('captcha')
|
||||
browser.show()
|
||||
sd['shown'] = True
|
||||
elif sd['shown'] and not SHOW:
|
||||
browser.hide()
|
||||
sd['shown'] = False
|
||||
try:
|
||||
st = soup.find('h2', class_='share-title')
|
||||
if st is None:
|
||||
|
@ -125,7 +117,6 @@ def read_channel(url, session, cw=None):
|
|||
info['nickname'] = st.text.strip()
|
||||
except Exception as e:
|
||||
print_(print_error(e)[0])
|
||||
print_(info)
|
||||
c = 0
|
||||
ids_now = set()
|
||||
items = soup.findAll('div', class_='video-feed-item') + soup.findAll('div', class_=lambda c: c and 'DivItemContainer' in c)
|
||||
|
|
|
@ -11,7 +11,7 @@ from io import BytesIO
|
|||
@Downloader.register
|
||||
class Downloader_xhamster(Downloader):
|
||||
type = 'xhamster'
|
||||
__name = r'(xhamster|xhwebsite)[0-9]*' #3881
|
||||
__name = r'(xhamster|xhwebsite|xhofficial|xhlocal|xhopen|xhtotal)[0-9]*' #3881
|
||||
URLS = [
|
||||
r'regex:{}\.[a-z0-9]+/videos/'.format(__name),
|
||||
r'regex:{}\.[a-z0-9]+/users/'.format(__name),
|
||||
|
@ -28,7 +28,11 @@ class Downloader_xhamster(Downloader):
|
|||
|
||||
@classmethod
|
||||
def fix_url(cls, url):
|
||||
return re.sub(cls.__name, r'\1', url)
|
||||
return re.sub(cls.__name, r'\1', url, 1)
|
||||
|
||||
@classmethod
|
||||
def key_id(cls, url):
|
||||
return re.sub(cls.__name+r'\.[^/]+', 'domain', url, 1)
|
||||
|
||||
def read(self):
|
||||
cw = self.cw
|
||||
|
|
|
@ -1,3 +1,40 @@
|
|||
3.7d 【】
|
||||
|
||||
[버그 해결 / 사이트 변경에 의한 수정]
|
||||
|
||||
- SankakuComplex 일부 URL 잘못 인식하는 문제 해결 (#3990)
|
||||
|
||||
- 일부 환경에서 토렌트 다운로드 안 되는 문제 해결 (#3998)
|
||||
|
||||
- #3951
|
||||
|
||||
- 오래된 설정파일 (*.ini) 읽지 못하는 문제 해결 (#4025)
|
||||
|
||||
- KAKAO WEBTOON 안정화 (#4009)
|
||||
|
||||
- Hitomi.la 업데이트 대응 (#4037, #4038)
|
||||
|
||||
- 기타 자잘한 것들
|
||||
|
||||
|
||||
[변경/추가된 기능]
|
||||
|
||||
- E(x)Hentai "Always use the Multi-Page Viewer" 지원 (#3415)
|
||||
|
||||
- HTTP API 지원
|
||||
옵션 - 설정 - 고급 설정 - HTTP API
|
||||
|
||||
- "브라우저로 보기" 수정
|
||||
|
||||
- ArtStation 더 좋은 화질로 다운로드 (#2600, #4039)
|
||||
|
||||
- Instagram 오래된 쿠키 경고 메시지 (#4014)
|
||||
|
||||
- 기타 자잘한 것들
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
3.7c 2021-11-05
|
||||
|
||||
[Bug Resolution / Fix due to site change]
|
||||
|
|
|
@ -1,3 +1,40 @@
|
|||
3.7d 【】
|
||||
|
||||
[버그 해결 / 사이트 변경에 의한 수정]
|
||||
|
||||
- SankakuComplex 일부 URL 잘못 인식하는 문제 해결 (#3990)
|
||||
|
||||
- 일부 환경에서 토렌트 다운로드 안 되는 문제 해결 (#3998)
|
||||
|
||||
- #3951
|
||||
|
||||
- 오래된 설정파일 (*.ini) 읽지 못하는 문제 해결 (#4025)
|
||||
|
||||
- KAKAO WEBTOON 안정화 (#4009)
|
||||
|
||||
- Hitomi.la 업데이트 대응 (#4037, #4038)
|
||||
|
||||
- 기타 자잘한 것들
|
||||
|
||||
|
||||
[변경/추가된 기능]
|
||||
|
||||
- E(x)Hentai "Always use the Multi-Page Viewer" 지원 (#3415)
|
||||
|
||||
- HTTP API 지원
|
||||
옵션 - 설정 - 고급 설정 - HTTP API
|
||||
|
||||
- "브라우저로 보기" 수정
|
||||
|
||||
- ArtStation 더 좋은 화질로 다운로드 (#2600, #4039)
|
||||
|
||||
- Instagram 오래된 쿠키 경고 메시지 (#4014)
|
||||
|
||||
- 기타 자잘한 것들
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
3.7c 【Nov 05, 2021】
|
||||
|
||||
[버그 해결 / 사이트 변경에 의한 수정]
|
||||
|
|
Loading…
Reference in New Issue