plugorgau / bbb-render

Scripts to convert a BigBlueButton recording into a single video file
MIT License
64 stars 26 forks source link

getting url presentation error #5

Open tbaror opened 3 years ago

tbaror commented 3 years ago

Hello,

I am trying to test bbb-render using instruction , while trying to download presentation i keep getting URL error as follows shown below, maybe i did something wrong please advice thanks

/home/bbb-render# ./download.py meetings.company.com/playback/presentation/2.0/playback.html?meetingId=9ac562b67f422723418ff6d50ed695281fe343b0-1603111367881 /home
  File "./download.py", line 16
    raise ValueError(f"Does not look like a BBB playback URL: {url}")
                                                                   ^
jhenstridge commented 3 years ago

The code in question is just trying to match the provided URL against a regular expression, both as a

https://github.com/plugorgau/bbb-render/blob/0644651d4c57afa329d71b7efccb24bf450fafe9/download.py#L14-L16

What you've shown here looks like it would match the regexp though, so presumably this isn't exactly what you ran to get the error message?

tbaror commented 3 years ago

The code in question is just trying to match the provided URL against a regular expression, both as a

https://github.com/plugorgau/bbb-render/blob/0644651d4c57afa329d71b7efccb24bf450fafe9/download.py#L14-L16

What you've shown here looks like it would match the regexp though, so presumably this isn't exactly what you ran to get the error message?

the only change is the company name which is meetings..com/playback/presentation

/2.0/playback.html?meetingId=9ac562b67f422723418ff6d50ed695281fe343b0-1603111367881

jhenstridge commented 3 years ago

It's hard to tell what to suggest, since the inputs you've provided don't match up with the errors. Here is what happens if I run the regular expression against the URL you provided in the original comment using python3's interactive mode:

$ python3
Python 3.8.6 (default, Sep 25 2020, 09:36:53) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> url = 'meetings.company.com/playback/presentation/2.0/playback.html?meetingId=9ac562b67f422723418ff6d50ed695281fe343b0-1603111367881'
>>> re.match(r'^.*/playback/presentation/2\.0/playback.html\?meetingId=(\S+)$', url)
<re.Match object; span=(0, 125), match='meetings.company.com/playback/presentation/2.0/pl>

Maybe try doing the same with the real URL you're using to see if it reports a match. If it does show a match, then are you sure you entered the URL correctly when running the the download script?

tbaror commented 3 years ago

It's hard to tell what to suggest, since the inputs you've provided don't match up with the errors. Here is what happens if I run the regular expression against the URL you provided in the original comment using python3's interactive mode:

$ python3
Python 3.8.6 (default, Sep 25 2020, 09:36:53) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> url = 'meetings.company.com/playback/presentation/2.0/playback.html?meetingId=9ac562b67f422723418ff6d50ed695281fe343b0-1603111367881'
>>> re.match(r'^.*/playback/presentation/2\.0/playback.html\?meetingId=(\S+)$', url)
<re.Match object; span=(0, 125), match='meetings.company.com/playback/presentation/2.0/pl>

Maybe try doing the same with the real URL you're using to see if it reports a match. If it does show a match, then are you sure you entered the URL correctly when running the the download script?

i did the regexp code this is the result i got `>>> import re

url = 'meetings.dalet.com/playback/presentation/2.0/playback.html?meetingId=9ac562b67f4227 23418ff6d50ed695281fe343b0-1603111367881' re.match(r'^.*/playback/presentation/2.0/playback.html\?meetingId=(\S+)$', url) <_sre.SRE_Match object; span=(0, 123), match='meetings.dalet.com/playback/presentation/2.0/pla y>

`

tbaror commented 3 years ago

<_sre.SRE_Match object; span=(0, 123), match='meetings.dalet.com/playback/presentation/2.0/play> i can see that in your results its matches up to pl> instead of play> , is matter?

aaaaalbert commented 3 years ago

Hi @tbaror, in case you still wonder about your last question: The differences in <_sre.SRE_Match object; ....> are irrelevant. Python just truncates the match string for displaying if it gets too long. (Try using a longer or shorter domain in the URL and you will see.)

What counts is the matched group which contains the meeting id. See James' comment above for the relevant quote from download.py.

So, the example you show in your previous comment looks like a correct match. re.match would have returned nothing if it had not found the regexp in the URL. (You can try this our as well :-)