Spider Image System User Guide
Struct design
- Spider pixiv.net img -> search img -> get url.
- Replace domain -> save url to txt.
- According to url download image from txt content.
- Spider gif image generate video.
- Download gofile file.
Execute method
- Run sis_v1.0.x.exe(windows platform).
- Run ./src/run/sh/run.bat(windows platform).
- Run ./src/run/sh/run.sh(linux platform).
Position
- If not visit pixiv.net website, could visit sd.2021.host or other url(example: sd.vv50.de) replace.
- Other.
GUI
- Pyqt5 paint main ui.
Technology lib
- selenium.
- loguru.
- requests.
- Other(Read requirements.txt).
Folder
- ./data/href_url/ artwork url folder.
- ./data/img_url/ img url txt folder.
- ./data/*/images/ save img folder.
- ./data/video generate video folder.
- ./data/according_pid_download_image pid image download folder.
- ./data/face_detect_result face detect result folder.
- ./data/error_images error images folder.
- ./log_dir/ script run log folder.
- Other see ./data/.
File
- ./data/download_final_image.json: final download image info.
- ./data/download_finished_txt.txt: already download keyword txt.
- ./data/error_image_txt.txt: download fail image save txt.
- ./data/spider_finished_keyword.txt: already spider finish keyword txt.
- ./data/spider_img_keyword_final.json: final spider keyword image json.
Other
- Self config constant val(Done).
- Play all video(Done).
- Autoplay all image(Done).
- Auto spider image(Done).
- System performance monitor(Done).
- Online show image(Done).
- Gif and image process(Done).
- Face detect from downloaded image folder(Done).
- Other small tools(Done).
- Other…(to be continued…)
bugs 1 : 在类方法中不能使用@logger.catch注解方法,会出现以下错误:
1
2
3
4
5
6File "C:\Users\Administrator\PycharmProjects\calmcar_sf_server\src\test\gui\ui_main.py", line 130, in ui_paint
app.exec_()
│ └ <built-in method exec_>
└ <PyQt5.QtWidgets.QApplication object at 0x000002045EF19AF0>
TypeError: next_img() takes 1 positional argument but 3 were givenproblem 1 on ubuntu: opencv-python与pyqt5冲突(问题解决)
1
2sudo pip3 uninstall opencv-python
sudo pip3 install opencv-python-headless1
2
3
4
5
6
7
8
9
10QObject::moveToThread: Current thread (0x55f29a27e0e0) is not the object's thread (0x55f29a946dd0).
Cannot move to target thread (0x55f29a27e0e0)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.10/dist-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
AbortedNotice: if cannot start spider image, you need install google chrome explore, detail:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
super().__init__(
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/chromium/webdriver.py", line 49, in __init__
self.service.path = DriverFinder.get_path(self.service, options)
│ │ │ │ │ │ │ └ <selenium.webdriver.chrome.options.Options object at 0x7f816cf3da20>
│ │ │ │ │ │ └ <selenium.webdriver.chrome.service.Service object at 0x7f816cf3da80>
│ │ │ │ │ └ <unprintable WebDriver object>
│ │ │ │ └ <staticmethod(<function DriverFinder.get_path at 0x7f816eb9cb80>)>
│ │ │ └ <class 'selenium.webdriver.common.driver_finder.DriverFinder'>
│ │ └ <property object at 0x7f816eb5ebb0>
│ └ <selenium.webdriver.chrome.service.Service object at 0x7f816cf3da80>
└ <unprintable WebDriver object>
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/common/driver_finder.py", line 41, in get_path
raise NoSuchDriverException(msg) from err
│ └ 'Unable to obtain driver for chrome using Selenium Manager.'
└ <class 'selenium.common.exceptions.NoSuchDriverException'>
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location~ For solve problem, need install follow package:
1
2
3
4
5
6apt install chromium-browser
sudo mkdir -p /home/czq/.local/share/applications
sudo touch /home/czq/.local/share/applications/mimeapps.list
chmod -R 777 /home/czq/
xdg-open https://www.baidu.com
re run ./sh/run.sh to solve the problemFor use face detect, you need run follow command on ubuntu:
1
2
3sudo apt-get update
sudo apt-get install libgtk2.0-dev pkg-config
run ./sh/run_face_detect.sh # (on ubuntu os)Install third-party libraries for project
1
2
3
4recommend use
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
single lib install command
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-pythonBuild project and publish pack
1
Pyinstaller main_test.spec #使用spec文件打包exe
solve not run on HECS(HuaWei ECS) from huawei cloud
1
2see
https://neucrack.com/p/407wait a moment, code will open to all people, please visit follow url download exe or source code:
https://gitee.com/caozhaoqi/spider_image_system