akaisorani / pixiv-crawler Goto Github PK
View Code? Open in Web Editor NEWpixiv image crawler
License: MIT License
pixiv image crawler
License: MIT License
Thanks for great work.
All most every function works well, but dl_diy_urls function doesn't work.
I tried
url = """https://www.pixiv.net/en/tags/%E9%BB%92%E9%AB%AA/illustrations?
order=popular_male_d&mode=safe&s_mode=s_tag&type=illust"""
pc.dl_diy_urls([url],10)
(%E9%BB%92%E9%AB%AA means 黒髪)
but my output is my url as blue string.
I guess the string means that url can't read.
In this case, how can i fix this problem?
If I were to give you 300 artists of similar themes, is it possible to find other related artists that produces such themes (assume that we are going 3 levels deep, that means A liking B liking C liking D means all of them are related)?
When I run this code:
import pixiv_crawler as pc
pc.set_value('username','(my user)')
pc.set_value('password','(my password')
pc.set_value("local_save_root","./%y.%m.%d")
pc.set_value("chrome","chromedriver.exe")
pc.login()
pc.dl_tag('線画', 20)
I get thrown this
loaded cookies
https://www.pixiv.net/en/tags/%E7%B7%9A%E7%94%BB/artworks?p=1
Traceback (most recent call last):
File "C:\Users\insan\anaconda3\lib\site-packages\pixiv_crawler\scraper_manga.py", line 230, in get_master_imagelist_from_resp
retlist=gmifr_tag(r)
File "C:\Users\insan\anaconda3\lib\site-packages\pixiv_crawler\scraper_manga.py", line 213, in gmifr_tag
js=r.json()
File "C:\Users\insan\anaconda3\lib\site-packages\requests\models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\insan\anaconda3\lib\site-packages\simplejson\__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "C:\Users\insan\anaconda3\lib\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "C:\Users\insan\anaconda3\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I've tried to figure out the issue, but I'm unable to get it.
Python 3.7 win10
I had tested it from pc , it worked . However , when i try it on VPS . it\s doesnt work . Can you fix it?
PS C:\Users\Angius> py pixiv.py
Traceback (most recent call last):
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1331, in getresponse
response.begin()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 297, in begin
version, status, reason = self._read_status()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\util\retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\packages\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1331, in getresponse
response.begin()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 297, in begin
version, status, reason = self._read_status()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pixiv.py", line 9, in <module>
pc.login()
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pixiv_crawler\scraper_manga.py", line 50, in login
r=session_requests.get(pixiv_root)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Angius\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
Code I'm trying to execute:
import pixiv_crawler as pc
pc.set_value('username','Username')
pc.set_value('password','Password')
pc.set_value("local_save_root","./pixiv/%y.%m.%d")
pc.set_value("cookies_file","./pixiv/cookies.txt")
pc.set_value("garage_file","./pixiv/garage.txt")
pc.login()
pc.dl_artist(15039870,pic_num=-1,deep_into_manga=True)
Python 3.6.5, Win10
按照Sample使用pc.dl_artist(4187518,pic_num=-1,deep_into_manga=False)会显示out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.