Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to download an episode gives a 404 error #132

Open
djon2003 opened this issue Feb 10, 2019 · 5 comments
Open

Trying to download an episode gives a 404 error #132

djon2003 opened this issue Feb 10, 2019 · 5 comments

Comments

@djon2003
Copy link

I am using Captvty to download Virginie and some episodes were not downloadable. So, I installed myself a VM with Debian and installed pytoutv. Unfortunately it gives me an HTTP 404 error when trying to get the same episodes.

i.e. "toutv fetch Virginie S09E10"

"toutv fetch Virginie S09E11" works fine, as in Captvty.

Does someone know why?

@simark
Copy link
Collaborator

simark commented Feb 10, 2019

I can't tell for sure, but it looks similar to #130. There were also some intermittent issues recently, like #131. I think we are using an old API, that is perhaps not as reliable as what the current mobile apps use. Does the same episode work in one of the official tou.tv apps?

@djon2003
Copy link
Author

It does work on the website and (I just installed) on Android app. Is there a plan to upgrade to the latest API? Otherwise, having some cues, I could do it.

@simark
Copy link
Collaborator

simark commented Feb 10, 2019

The task is up grabs :). I think I took a look at some point, and it was not too obvious. The most basic way to reverse the API is to use something like mitmproxy to see what requests the application or web page does. Then you try to replicate it in toutv's code. I didn't have much success, but I don't have any particular knowledge of video formats and distribution, so I was a bit lost. Maybe somebody with some experience in that would have more success.

@djon2003
Copy link
Author

Neither I have... :( Once I looked using Wireshark... but stopped really quickly to find a software already doing it. Unfortunately, only few episodes aren't downloadable.

I am not a video expert at all, but there is nothing I wanted to do I coud not achieve. So, tell me what were the problems you had, maybe I could start from there. More over, I barely coded in Python, but hey, what's the problem!? LOL!.

@simark
Copy link
Collaborator

simark commented Feb 10, 2019

It's been a while, I don't recall what didn't work exactly. But I was try to do the same requests as what I was seeing, and I wouldn't get the same result as the official got. If I knew what I was doing wrong, I wouldn't have any problem :)

It might be easier to use something like mitmproxy rather than Wireshark, if the traffic is over https (in Wireshark, you just see encrypted streams).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants