niveK77pur / gogoanime

Simple terminal downloader for Gogoanime episodes (entire seasons)
2 stars 1 forks source link

New episodes for seasonals don't have the link included #2

Closed niveK77pur closed 2 years ago

niveK77pur commented 2 years ago

It seems that trying to fetch the latest episode of a seasonal anime, does not put the actual link into the links.txt file. It only adds the two out and referer fields which results in the file looking something like this, where there is obviously a link missing before the second out.

...
<link to an episode here>
    out=...
    referer=...
    out=...
    referer=...

Possible workarounds if this occurs:

  1. Delete the last two lines from the file and retry.
  2. If it still does not work delete the last five lines as shown in the above code block (or the last few episodes if you want to be sure).
  3. Worst case: delete the file and retry (which will re-download all the links).
niveK77pur commented 2 years ago

Turns out, the link is added, but since the file is not newline terminated it will be appended to the line saying referer. Simple fix should be to add a newline when writing to the file.

Workaround given this: Find where the new link begins in the referer= line and simply make a line break such that the link has no indentation.