ayushdiagarwal / Manga-Scraper

This is a scraper that downloads manga from https://kissmanga.com/. Kissmanga is down now, probably forever, so this doesn't work now.
MIT License
7 stars 2 forks source link

save_path error #4

Closed damvelisa closed 4 years ago

damvelisa commented 4 years ago

image

ayushdiagarwal commented 4 years ago

I didn't thought anyone would be viewing this project now, So, thank you for checking this out,so I adjusted this project to "just make it work in my system". But I'll try my best to help you.

First, It would be really helpful, if you had a linux system if not you'll have to go to a old version of this project, which is this. You'll have to download the files again. And don't run the manga.py file, instead run alt.py file.

So, I don't know why that shows a error in your system, it works fine in mine. Still, there is workaround it, you'll have to change the save_path variable on line 32 to a location on your computer where you wanna store the files. For example: < line 32 > save_path = C:\Users\dakano\Downloads\ That should probably work, if not let me know, I'll make it work somehow. Make sure, to download the chromedriver to make selenium work and a lot of times there is a error in making the making the pdf. so I removed that and instead just made a folder which has the images, I changed this to work in linux somehow but I'll have to do some stuff to make it work in windows too. If you're having any problem, please let me know.

damvelisa commented 4 years ago

i thanks too.. for you response. i just curious :smile: . i try change the path but same problem happen.
(linux version) Screenshot_1 image

(windows Version) are you sure. i'll have to change save_path variable on line 32. here we go... image image sorry i don't know python deeply. :disappointed: i hope this screenshoot help you to fix it.

ayushdiagarwal commented 4 years ago

My Bad, I'm sorry. I figured out the error in this one though, looks like you are not aware about environmental variables, no problem though. I've made a alternative .py file that should work for you. It's at the end, and the error is explained below.

The line you changed contains the following text: save_path = os.environ.get("/home/ubuntu/Manga-Scraper/Others")

The os.environ.get() function requests variables from the system, in this you're just inputing the path as a string so, replace that line with this text`

save_path = "/home/ubuntu/Manga-Scraper/Others"

Do the same with the chromedriver variable too, Replace it with,

driver_path = "/usr/lib/chromium-browser/chromedriver"

That should work.


I made a alternative file, which you can use here is the link. Save that file with a .py extension and change the variables on line 30 and 34. I've removed the whole environmental variable thingy, so you just need to paste the path as a string. Also, if you're on linux, please go on with the latest version as it as the latest features, and install the requirements as said in the README. If it's still not working, I'll try my best to make it work.

damvelisa commented 4 years ago

your code it's work sir.... but my internet provider too slowl to access kissmanga. :sweat_smile: here it is path on windows.

try:
    # save path for the manga
    # Please change the path
    save_path = "C:\\Users\\dakano\\ma\\"
except:
    save_path = str(Path(__file__).parent.resolve())
# Getting chromedriver details
driver_path = "C:\\Users\\dakano\\ma\\chromedriver"
Options = Options()
Options.headless = True
print("Launcing Web browser Silently...")

and screenshot image

but something happen after finished . where is the others chapter.

empty2

ayushdiagarwal commented 4 years ago

I told you last time that the latest version won't work with windows, as I configured it to my needs. You need to use the older version to make it work in windows, but nevermind, I did some changes in the script to make it work in any operating system. So just go and download the latest files and remember to use the environmental variables and stuff like I told you last time, and don't use the alternative code that I sent as that won't work in windows. Let me know if it works or not.

damvelisa commented 4 years ago

its work sir image thanks a lot....

and i still used this + your new code.

try:
    # save path for the manga
    # Please change the path
    save_path = "C:\\Users\\dakano\\ma\\"
except:
    save_path = str(Path(__file__).parent.resolve())
# Getting chromedriver details
driver_path = "C:\\Users\\dakano\\ma\\chromedriver"
Options = Options()
Options.headless = True
print("Launcing Web browser Silently...")

here it is

ayushdiagarwal commented 4 years ago

That's good to know! And please dude, no need to refer to me as sir, I'm just a teen. Also, I know it would sound weird coming from me, but if you can, please buy the manga and support the mangaka, if you can't, you have the script! Thanks for checking this project out, I'll close this issue now.