Damianonymous / streamlink-plugins

88 stars 42 forks source link

stripchat.py #19

Closed SnowManWithCarrot closed 3 years ago

SnowManWithCarrot commented 3 years ago

The plugin will not work if the streamer name contains "-"

Example:

"My-name-is"

or

"My-name"

Error codes:

"error: Unable to validate JSON: Unable to validate key 'cam': Unable to validate result: Type of [] should be 'dict' but is 'list'"

nxkbd commented 3 years ago

@SnowManWithCarrot Workaround that works for me: get latest stripchat.py and change line 7 _url_re = re.compile(r"https?://(\w+\.)?stripchat\.com/(?P<username>\w+)") to _url_re = re.compile(r"https?://(\w+\.)?stripchat\.com/(?P<username>[\w\d_-]+)")

SnowManWithCarrot commented 3 years ago

@nxkbd Thanks that actually fixed the problem :)

mikedouglax commented 3 years ago

@nxkbd the same error happens when the streamer name contains "_"

SnowManWithCarrot commented 3 years ago

@mikedouglax

Apply the fix @nxkbd provided and it will also fix the "_" issue.

I've just tested both.

mikedouglax commented 3 years ago

i've just tried, let me try again

mikedouglax commented 3 years ago

error: Unable to open URL: https://b-hls-20.strpst.com/hls/29559103/master_29560103.m3u8 (HTTPSConnectionPool(host='b-hls-20.strpst.com', port=443): Read timed out. (read timeout=20.0))

Damianonymous commented 3 years ago

@mikedouglax

This is probably a different problem and also occurs with standard streamer names.

SnowManWithCarrot commented 3 years ago

@Damianonymous correct.

I can confirm that is happening with some of the streamers that mostly stream from outside and their connection is not that good so the calls from the API take longer than 20s leading to the "timeout 20.0" .

Possible solution is to remove the timeout,add longer timeout (120?,300?) or add sleep.time(xx).

odnar-dev commented 3 years ago

need to add default stream as a fallback . i think i fixed it with this

SnowManWithCarrot commented 3 years ago

I tested it for few days and can confirm that the fix @odnar-dev fixed the timeout issue.