einstein95 / crunchy-xml-decoder

GNU General Public License v2.0
35 stars 14 forks source link

Video titles aren't being correctly decoded from HTML #5

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi, whenever I try to download videos with quotation marks " " in the file name I get the following problem as displayed in the image. Is there anyway I can fix this?

The download begins and once it completes it quickly closes and doesn't make the .mkv file it leaves the .flv and .ass file in the export folder as shown in the image below without the quotation marks " ". But if i just extract the subtitles it copies the file name exactly "Devil" including the quotation marks.

cr1

What shows up in the .bat:

"Video and subtitle files should now have been downloaded. Moving to export folder... 1 file(s) moved. 'quot' is not recognized as an internal or external command, operable program or batch file. 'quot' is not recognized as an internal or external command, operable program or batch file.

Error: Could not find file '...\Crunchyroll Downloader Toolkit DX\export\One Piece- Thriller Bark (326-384) Episode 350 - The Warrior Known As the .flv'. Video Split Complete

Starting mkv merge mkvmerge v6.8.0 ('Theme for Great Cities') 32bit build on Mar 2, 2014 21:27:07 Error: The file '.\export\One Piece- Thriller Bark (326-384) Episode 350 - The Warrior Known As the .264' could not be opened for reading: open file error. Merge process complete"

Thanks

EDIT: How I overcame this problem I inserted the command PAUSE after ":STEP1-GETVIDEO" was complete and changed file name to "One Piece- Thriller Bark (326-384) Episode 350 - The Warrior Known As the .flv" as it seems in the error it doesn't recgonise "" and wouldn't continue with the full file name, I then pressed any key and it continued as normal. But if anyone knows how I can fix the code to allow for "" it would be greatly appreciated!

alzamer2 commented 9 years ago

hi tanks for the hard work from what i see the problem not "decoded from HTML" but rather in """ in the file name any special character in the html transform to "&"+character+";" but the "&" is special character in cmd which mean run this function as will for example "echo hi & echo ok" in cmd dont print hi & echo ok but rather hi ok this batch code can fix but you need to integrate it in the code

for %%i in (export.) do ( set tmepx=%%~nxi call ren "%%i" "%%tmepx:"=''%%" )