wwyaiykycnf / e621dl

The automated e621.net downloader
40 stars 23 forks source link

Downloader stopped working #39

Open ssz333 opened 7 years ago

ssz333 commented 7 years ago

I've been using this program for a while now, everything working without problem until last week - when i'm trying to run it, i'm getting

http://i.imgur.com/r44Frgm.png

Haven't changed anything in software nor hardware. Anybody know how to fix this?

Wulfre commented 7 years ago

This was solved in issue #36. e621 blocked the user agent that wwyaiykycnf was using. DatDragy submitted pull #37 which should fix it up if you manually make the changes; Otherwise, my fork is still being actively worked on and I just fixed this in a release.

ssz333 commented 7 years ago

Thanks for your answer

I've checked both links you posted and tried to fix it on my own - with no success, sadly. Since .pyc files doesn't seem to be openable, i've downloaded source version of e621dl by ww. Then i attempted to edit the .py files just like it said in #36 http://i.imgur.com/BzITLut.png. Also tried without v and adding e621dl instead - same result, which is invalid syntax error - http://i.imgur.com/Rn8eN5m.png - and i have no idea how to fix it, yet again. Never seen anything other than .exe file before.

EDIT I have also tried downloading your version, same problem

Wulfre commented 7 years ago

You should not replace VERSION with the actual version number. It is a variable that supplies the current version number to the program upon request. You should type in the code from the pull request exactly how it is written. I hope I explained that well.

My fork should not need any configuration other than picking your tags in the config file, and it needs to be run manually from the command line because I never complied a windows binary. I won't go into great detail about my fork here since it wouldn't be appropriate and may be confusing to people who read this issue at a later time.

AzureWaning commented 7 years ago

I was having the same problem, I got the Python version, installed Python and changed the files according to #37 but now I don't know how to run the program (e621dl.py), if I run it directly it pops up and closes itself immediately. I have no idea of what I'm doing.

DatDraggy commented 7 years ago

Search for "IDLE". It's the python editor/ide. Open it and then click on "File". There you go to open and simply open your e621dl.py file inside the e621dl directory. Then you press F5 (or go to Run > Run Module)

If you get any errors about syntax etc download python 2.7

silveralf commented 7 years ago

I have the same issue. Can anyone please help me with it (in human language please...)!

DatDraggy commented 7 years ago

https://youtu.be/oZsH0gO-ICw

Okay. Go to https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi and install python 2.7 if you dont already have it. Then open "IDLE (Python GUI)" (should find it by just typing it in your search bar). Download the e621 downloader from here https://github.com/wwyaiykycnf/e621dl/archive/v2.4.6.zip and unzip it.

Click on File and it should look like this: https://puu.sh/uBxX2/f2f04ed214.png Now go to open and open the e621dl.py file. Minimize the new window and now go into the e621 directory with your windows explorer. Now go into "lib" so that you can see these files: https://puu.sh/uBy9o/45281dad42.png Now you either just double click "support.py" and "downloader.py" or edit them with notepad. Now go to line 15 and replace version = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070731 Ubuntu/dapper-security Firefox/1.5.0.12' with version = 'e621dl ' + VERSION + ' (by putYourNameHere)'

Then add from from lib.version import VERSION below the last orange "import" text.

It's supposed to look like this: https://puu.sh/uByna/f5de1be2ed.png

Now save with ctrl+s and close both windows again. Open the first window (e621dl.py) and press F5.

Tell me if you need any more help

If you are completely lost I can just do it for you over TeamViewer if you're okay with that. (TeamViewer lets me remote control you PC but you can stop it at any time by just moving the mouse)

silveralf commented 7 years ago

Thank you so much for your detailed explanation man! Everything working fine now! kudos+++

DatDraggy commented 7 years ago

No problem :D Just recorded a video so that I can just send that to people lol.

silveralf commented 7 years ago

Nice! There is a small mistake in your comment on this line: 'Now you either just double click "version.py" and "downloader.py" or edit them with notepad.'

I was suppose to edit downloader.py and SUPPORT.PY instead of VERSION.PY (i saw it thanks to your screenshot)!

silveralf commented 7 years ago

upd: I have pasted my old tags.txt and config.txt files and the download works perfect! Thanks again!

DatDraggy commented 7 years ago

Oops! Thanks for telling me xD

AzureWaning commented 7 years ago

Here's what I get when I try to run it:

Traceback (most recent call last):
  File "my e621.py location", line 93, in <module>
    current_page, default.MAX_RESULTS)
  File "my e621_api.py location", line 30, in get_posts
    uploads.append(UPLOAD(post['file_url'], post['md5'], post['file_ext']))
TypeError: string indices must be integers

e621_api.py doesn't seem to exist in the folder :/

DatDraggy commented 7 years ago

Can you send me a screenshot of your e621dl-master folder?

Wulfre commented 7 years ago

That error is for having more than 5 tags being searched for. wwyaiykycnf didnt code anything to catch it.

DatDraggy commented 7 years ago

Oh lol rip my error reading

ChillAnon commented 7 years ago

Has anyone here gotten the Mac version working? I followed all of the instructions with editing the files like you requested, but for some reason I am still getting the following error:

//

MyMacName:~ MyName$ cd '/Users/MyName/Desktop/e621dl-2.4.6/' && '/usr/bin/pythonw' '/Users/MyName/Desktop/e621dl-2.4.6/e621dl.py' && echo Exit status: $? && exit 1 e621dl INFO running e621dl version 2.4.6 e621dl INFO e621dl was last run on 2017-03-13 Traceback (most recent call last): File "/Users/MyName/Desktop/e621dl-2.4.6/e621dl.py", line 93, in current_page, default.MAX_RESULTS) File "/Users/MyName/Desktop/e621dl-2.4.6/lib/e621_api.py", line 26, in get_posts results = loads(SPOOF.open(request).read().decode()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded MyMacName:e621dl-2.4.6 MyName$

//

Just for added into, the only thing in my "tags.txt" file was my name, which shouldn't have triggered any results, so I do not know why it is triggering max results in that error.

DatDraggy commented 7 years ago

Try cd-ing in the dir first and then only type "python e621dl.py" in the terminal. I don't really have an idea what is not working. Never really understood python errors shrugs. You sure you changed both user agents correctly? Can you show me the lines?

BluBudgies commented 7 years ago

Is there no way to have it use the same .cache, so I don't download all the files again? It crashes any time I try adding my old .cache. (I am assuming that is how it knows what images you already have.) Also it seems the "part_used_as_name": "id", is not working.

DatDraggy commented 7 years ago

You should mess with the cache. Just leave it there. If you leave all the files in the downloads dir then it won't redownload them.

What do you mean with

Also it seems the "part_used_as_name": "id", is not working.

BluBudgies commented 7 years ago

Nevermind, I am stupid I used 33 I forgot I had that version. My bad.

ChillAnon commented 7 years ago

Sorry for the delay DatDraggy,

I CD'd into the directory and then did "python e621dl.py" and this is what the output was:

// e621dl INFO running e621dl version 2.4.6 e621dl INFO e621dl was last run on 2017-03-13 Traceback (most recent call last): File "e621dl.py", line 93, in current_page, default.MAX_RESULTS) File "/Users/MyName/Desktop/e621dl-2.4.6/lib/e621_api.py", line 26, in get_posts results = loads(SPOOF.open(request).read().decode()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded MyMacName:e621dl-2.4.6 MyName$

//

Any ideas?

ChillAnon commented 7 years ago

So, quick update, I downloaded and tested the master .zip from here: https://github.com/wwyaiykycnf/e621dl/archive/master.zip

So, the issue is not with the tags because I tested it with a bunch of tags and it worked, but once I change the "last run" date on the "config.txt" file, I get the error above. I can change any other part of the config file, but if I change the date at all I get that error.

DatDraggy commented 7 years ago

If you download the newest version from the newest release then everything should work after changing the user agent. What are you exactly trying to change it to? Maybe its just the wrong format becaude thats the only reason I can think off

ChillAnon commented 7 years ago

So, weirdly enough, I fixed the date issue by changing the file "default.py" in the "lib" folder. Now the program works fine.

On line 6, I edited the following:

//

DATETIME_FMT = "%Y-%m-%d"

DATETIME_FMT = "%y-%m-%d"

//

I'm not 100% sure why this works, but it does.

Godwrath1 commented 7 years ago

Any idea why I keep getting the error message "missing parentheses in call to 'print'" on line 145 both with the original scripts and with the edited ones? Edit: in e621dl.py Edit: Seems I needed ( ) around the ' ' to get it to work but now it's telling me "ImportError: No module named 'FixedFifo'" when it's clearly right there.

DatDraggy commented 7 years ago

I think you are using the wrong python version. You need 2.7 to run it ^^ Python 3 has a different syntax.

Godwrath1 commented 7 years ago

Yeah. I figured that out and was just going to come and delete my comment before someone realized I was being a derp. I was using 3.4. Seems everything is running right now.