Skip to content

plugins.afreeca: fix broadcast number regex #5847

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

Merged

Conversation

B4TT3RY
Copy link
Contributor

@B4TT3RY B4TT3RY commented Feb 20, 2024

Resolves: #5845

I found a changes for the https://play.afreecatv.com/{username}.
By modifying the regex, streamlink can get the stream URL correctly.

[session][debug] Plugin afreeca is being overridden by /home/b4tt3ry/.local/share/streamlink/plugins/afreeca.py
[cli][debug] OS:         Linux-6.5.11-8-pve-x86_64-with-glibc2.38
[cli][debug] Python:     3.11.6
[cli][debug] OpenSSL:    OpenSSL 3.2.1 30 Jan 2024
[cli][debug] Streamlink: 6.5.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2023.11.17
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.2
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.20.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.31.0
[cli][debug]  trio: 0.24.0
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  typing-extensions: 4.9.0
[cli][debug]  urllib3: 1.26.18
[cli][debug]  websocket-client: 1.7.0
[cli][debug] Arguments:
[cli][debug]  url=https://play.afreecatv.com/ecvhao/
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin afreeca for URL https://play.afreecatv.com/ecvhao/
Available streams: sd (worst), hd, original (best)

Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Could you please also update the CHANNEL_API_URL to https real quick?

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Feb 20, 2024
@bastimeyer bastimeyer changed the title plugin.afreeca: fixed could not find broadcast number plugins.afreeca: fix broadcast number regex Feb 20, 2024
@B4TT3RY
Copy link
Contributor Author

B4TT3RY commented Feb 20, 2024

Thanks for the PR.

Could you please also update the CHANNEL_API_URL to https real quick?

When i change http to https:

[session][debug] Plugin afreeca is being overridden by /home/b4tt3ry/.local/share/streamlink/plugins/afreeca.py
[cli][debug] OS:         Linux-6.5.11-8-pve-x86_64-with-glibc2.38
[cli][debug] Python:     3.11.6
[cli][debug] OpenSSL:    OpenSSL 3.2.1 30 Jan 2024
[cli][debug] Streamlink: 6.5.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2023.11.17
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.2
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.20.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.31.0
[cli][debug]  trio: 0.24.0
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  typing-extensions: 4.9.0
[cli][debug]  urllib3: 1.26.18
[cli][debug]  websocket-client: 1.7.0
[cli][debug] Arguments:
[cli][debug]  url=https://play.afreecatv.com/ecvhao/
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin afreeca for URL https://play.afreecatv.com/ecvhao/
error: Unable to validate JSON: ValidationError(dict):
  Unable to validate value of key 'view_url'
  Context(url):
    Unable to validate URL attribute 'scheme'
    Context(AnySchema):
      ValidationError(equality):
        'https' does not equal 'rtmp'
      ValidationError(equality):
        'https' does not equal 'http'

Co-authored-by: Sebastian Meyer <mail@bastimeyer.de>
@bastimeyer
Copy link
Member

error: Unable to validate JSON: ValidationError(dict):
  Unable to validate value of key 'view_url'
  Context(url):
    Unable to validate URL attribute 'scheme'
    Context(AnySchema):
      ValidationError(equality):
        'https' does not equal 'rtmp'
      ValidationError(equality):
        'https' does not equal 'http'

Add https to the validation schema at line 80.

Copy link

@NormanMises NormanMises left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata {author} seems not work

@bastimeyer
Copy link
Member

metadata

Different issue: #5813
The plugin doesn't advertise metadata support. This PR is about fixing the streams.

@bastimeyer bastimeyer merged commit 8a29117 into streamlink:master Feb 20, 2024
@NormanMises
Copy link

metadata

Different issue: #5813 The plugin doesn't advertise metadata support. This PR is about fixing the streams.

sorry I fotgot that lol... It will be nice if it can be supported~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin issue A Plugin does not work correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.afreeca : Could not find broadcast number.
4 participants