VijayQin / DMHY-spider

This project aims at crawling on DMHY, and store the html and torrent of each animation in our local file systems and in database(SQLite3). The future work will be filtering animation we want by the given rules and alert us to those updated every day.
14 stars 2 forks source link

跑出這個東西 #9

Open s4028600 opened 7 years ago

s4028600 commented 7 years ago

File "DMHY_DataBase.py", line 45 print "type:", type ^ SyntaxError: Missing parentheses in call to 'print'

雖然我也不清楚前面的操作對不對

fno2010 commented 7 years ago

@s4028600 因为你用的Python3,目前的脚本看起来是基于Python2.7的,和Python3不兼容

s4028600 commented 7 years ago

我是用這裡的PY檔案 https://github.com/VijayQin/DMHY-spider/archive/master.zip 我改用2.7後點兩下畫面一閃就不見了

如果用python DMHY_DataBase.py 他會跑出 D:\python>python DMHY_DataBase.py 'python' 不是內部或外部命令、可執行的程式或批次檔。

對檔案點右鍵用Edit with IDLE 點F5後跑出這個 Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.

==================== RESTART: D:\python\DMHY_DataBase.py ====================

完全不知道怎麼辦……

fno2010 commented 7 years ago

@s4028600 在windows里使用Python,你至少需要 follow 这个链接 里的 3.3.1 和 3.3.2。

不过原作者(@VijayQin)这个很懒的家伙说由于动漫花园网站有更新,目前这个脚本可能有 bug。可能有生之年会更新吧……

s4028600 commented 7 years ago

@fno2010 那拜託可不可以教學一下 或是介紹一下其他可以爬花園種子的程式… 求大神了

VijayQin commented 7 years ago

@s4028600 抱歉最近有paper的DDL無法及時做升級。 敬請期待預定下個月發佈的2.0版本。

nephidog commented 4 years ago

不好意思我用3python3.8跟2.7都會出現 File "C:\Users\Nephi\Desktop\爬蟲\DMHY-spider-master\DMHY-spider-master\DMHY_DataBase.py", line 45 print "type:", type ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("type:", type)? 請按任意鍵繼續 . . . 然後就閃退了,請問有解決的辦法嗎?

fno2010 commented 4 years ago

不好意思我用3python3.8跟2.7都會出現 File "C:\Users\Nephi\Desktop\爬蟲\DMHY-spider-master\DMHY-spider-master\DMHY_DataBase.py", line 45 print "type:", type ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("type:", type)? 請按任意鍵繼續 . . . 然後就閃退了,請問有解決的辦法嗎?

@nephidog 应该只有Python3会报这个错,因为脚本用的python2的语法,只能用python2跑(其实应该是懒得更新了

话说这个项目还在维护吗?仅供学习参考,别对功能有太多期待。。。

nephidog commented 4 years ago

在CMD中輸入python 會跑出 C:\Users\Nephi>python Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

所以應該是2.7沒錯

然後我開啟後會出現22行錯誤 Traceback (most recent call last): File "C:\Users\Nephi\Desktop\爬蟲\DMHY-spider-master\DMHY-spider-master\DMHY_DataBase.py", line 22, in import requests ImportError: No module named requests 請按任意鍵繼續 . . .

nephidog commented 4 years ago

後來發現是有些插件沒裝,淡妝完插件後會跑編碼問題 Traceback (most recent call last): File "C:\Users\Nephi\Desktop\DMHY-spider-master\DMHY_DataBase.py", line 11, in codecs.register(cp65001) NameError: name 'codecs' is not defined

fno2010 commented 4 years ago

interesting... code第11行和你的报错也对不上啊,你改code了吗?

nephidog commented 4 years ago

可以了,我WIN10到語言跟時區那邊改成UTF-8之後用CMD打開DMHY_DataBase.py就沒抱錯了,謝謝你~

VijayQin commented 4 years ago

@fno2010 hhhh好久没有维护了

fno2010 commented 4 years ago

@VijayQin dmhy已经有自己的app了,并且应该不用爬网页,可以直接读数据库,效率应该更高