Gujal00 / ResolveURL

Fork of UrlResolver for XBMC by @t0mm0, @eldorados, @bstrdsmkr, @tknorris and @jsergio123
GNU General Public License v2.0
121 stars 58 forks source link

fix for cda.py because of changing the quotation mark to an apostrophe in code #919

Closed teletcl closed 3 weeks ago

teletcl commented 3 weeks ago

Because "cda.pl" changed quotation mark (") to apostrophe (') , fix is needed to resolver. match = re.search(r'''player_data=['"]([^'"]+)''', html) should be replaced with match = re.search(r'player_data="([^"]+)"', html) or re.search(r"player_data='([^']+)'", html) (2 appearances in code)

The code match = re.search(r'player_data=("|\')(.*?)\1', html) could also work, but since it would move the group of brackets due to the rest of the code, I suggest solution 1.

teletcl commented 3 weeks ago

Example url: https://www.cda.pl/video/8453421fe?wersja=1080p

Gujal00 commented 3 weeks ago
info <general>: SMR Link Tester: Playing Link: |https://ebd.cda.pl/508x286/8191118a4|
info <general>: SMR Link Tester: Link Supported: |https://ebd.cda.pl/508x286/8191118a4| Resolvers: cda
info <general>: SMR Link Tester: Link Resolved: |https://ebd.cda.pl/508x286/8191118a4|https://vwaw055.cda.pl/e/b/d/d5j6fR1Fcc_O2l7I2oSTwQ/339b/Zmg4M0JNTUxVanAvZXIwZFVLQT0/1730704563/hdcf45364e7bd16ed8c88ac1275d726e75.mp4|Referer=https%3A%2F%2Febd.cda.pl%2F647x500%2F8191118a4%2Fvfilm&User-Agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F116.0.0.0+Safari%2F537.36+Edg%2F116.0.1938.62|{}|

screenshot00000

Gujal00 commented 3 weeks ago
info <general>: SMR Link Tester: Playing Link: |https://www.cda.pl/video/8453421fe|
info <general>: SMR Link Tester: Link Supported: |https://www.cda.pl/video/8453421fe| Resolvers: cda
info <general>: SMR Link Tester: Link Resolved: |https://www.cda.pl/video/8453421fe|https://vwaw122.cda.pl/e/b/d/SlpQfgr_Laq_fLDCOjbk8g/339b/Zmg4M0JNTUxVanAvZXIwZFVLQT0/1730707003/hdba24bbf79e5b74a5bb22b5cc788897ca.mp4|Referer=https%3A%2F%2Febd.cda.pl%2F647x500%2F8453421fe%2Fvfilm&User-Agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F116.0.0.0+Safari%2F537.36+Edg%2F116.0.1938.62|{}|

screenshot00001

teletcl commented 3 weeks ago

Don't understand - it's working now. Sorry, maybe in my cache something was.