chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 585 forks source link

Chaturbate plugin stopped working #1569

Open basstard66 opened 7 years ago

basstard66 commented 7 years ago

Chaturbate changed their html layout and the plugin stopped working.

The solution is simple. Change Line 7 in chaturbate.py from

_playlist_url_re = re.compile("html \+= \"src='(?P\<url>[^']+)'\";")

to

_playlist_url_re = re.compile("loadHlsVideo\('(?P\<url>[^']+)")

cb123321 commented 7 years ago

Thanks

basstard66 commented 7 years ago

Hi, yes, the \<url> is required (named capture group). I copied the correct line but the editor here mistakes it for some code stuff. I had to escape this "tag" with backslashes. Thanks for bringing this to my attention :-) The code above is now correct.

Jane69 commented 7 years ago

I can confirm this.

However, what is the fix for Python 2?

The given line causes this error:

Failed to load plugin chaturbate:
  File "/home/jane/.local/lib/python2.7/site-packages/livestreamer/plugins/chaturbate.py", line 9, in <module>
    _playlist_url_re = re.compile("loadHlsVideo('(?P<url>[^']+)")
  File "/usr/lib/python2.7/re.py", line 194, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.7/re.py", line 251, in _compile
    raise error, v # invalid expression
error: unbalanced parenthesis

Thanks ;)

basstard66 commented 7 years ago

Arghhhh, this editor is killing me. It also eats single backslashes :-( This is no Python 2 problem I think (running 2.7 here). Rechecked everything, it should work now... Copy that line again from above please.

Jane69 commented 7 years ago

Okay - I can confirm that line fixes it for Python 3

(Have not tested Python 2)

Thanks ;)

reasonabledoubt commented 7 years ago

Just FYI all, it's fixed in https://github.com/streamlink/streamlink/issues/455.

streamlink is a fork of livestreamer and is under active development as it appears livestreamer no longer is.

basstard66 commented 7 years ago

Oh, OK. Didn't know that yet. Just ran into that error and decided to fix it myself... I'm gonna have a look at streamlink. Thanks.

AshleyUK1984 commented 7 years ago

Hi, I would like to fix this error, but I can't seem to do it?? I don't think I know how to :(

So, I'm going to "C:\Program Files (x86)\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins" and in this folder, I find chaturbate.pyc ... But when I open it with notepad++ to change the line, it's just a load of random characters :(

Where am I going wrong? Can someone please upload the fixed file.

Thank You

basstard66 commented 7 years ago

Hi,

I can't attach a py file here. Open chaturbate.py not chaturbate.pyc. There you will find the code described. Change the code and save the file. Rename chaturbate.pyc or delete it. It will be recreated automatically. Otherwise recompile it with

python chaturbate.py

HTH

AshleyUK1984 commented 7 years ago

I downloaded the Windows Binaries file, so I only had the pyc files available to me. I managed to do it though.. I just recreated a blank text file renamed it as chaturbate.py (not pyc like all the others), got the original script from the GIT, edited the line text from above, and then just resumed my script.. It's working fine now :) Thanks a lot!!

basstard66 commented 7 years ago

Glad I could help... :-)

makedir commented 7 years ago

Obviously, you did it wrong. Read above, and try again.

TimeTravelingCat commented 7 years ago

Livestreamer only runs pyc files, you need to get python 2.7 and compile the fixed chaturbate.py file.

cdrage commented 7 years ago

Hey all.

You can run:

pip install streamlink

And run the same command. We've fixed the plugin there :)

makedir commented 7 years ago

Totally nonsense. For Windows:

Under: C:\Program Files (x86)\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins with admin rights (edit path for your version)

  1. delete or rename chaturbate.pyc ( make backup )
  2. create modified chaturbate.py ( https://jpst.it/S7gQ )
  3. profit
AshleyUK1984 commented 7 years ago

Anybody else having problems with this plugin again? The same kind of scenario is happening as before. I applied the first fix, and it's been working until last night?

Thanks

cdrage commented 7 years ago

@AshleyUK1984

Hey Ashley,

This is working within streamlink, a fork of livestreamer.

AshleyUK1984 commented 7 years ago

Hi, Please forgive me, seems like I found the problem. The hard drive was completely full! I'm such an idiot lol, Very sorry.

Thanks anyway.

cb123321 commented 7 years ago

Is there a problem again? Since a couple of hours I get this message "error: No streams found on this URL:" :/

t0wer10 commented 7 years ago

Having the same issue here.

AshleyUK1984 commented 7 years ago

I think the script is alright, I have a few streams recording, and a few failing for 502 and 404... So I think the site is just having a couple of issues. Hopefully be resolved soon.

cdrage commented 7 years ago

@AshleyUK1984 @cb123321 @t0wer10 @makedir

Use https://github.com/streamlink/streamlink a fork of Livestreamer (I'm one of the maintainers). This plugin works on there.

@chrippa abandoned this project and hasn't communicated for over a year.