Skip to content
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

AttributeError: 'bool' object has no attribute 'replace' when rezka.getStream(1, 5) #9

Open
barl0g opened this issue Jun 18, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@barl0g
Copy link

barl0g commented Jun 18, 2024

File

$ cat test1.py
from HdRezkaApi import *

url = "https://hdrezkaXXXX.org/series/comedy/1733-druzya-1994.html"

rezka = HdRezkaApi(url)
print(rezka.name)
stream = rezka.getStream(1, 5)

Exec

$ python test1.py 
Друзья
Traceback (most recent call last):
  File "/home/user/www/hdrezka/test1.py", line 7, in <module>
    stream = rezka.getStream(1, 5)
  File "/home/user/miniconda3/lib/python3.10/site-packages/HdRezkaApi/__init__.py", line 231, in getStream
    return getStreamSeries(self, int(season), int(episode), tr_id)
  File "/home/user/miniconda3/lib/python3.10/site-packages/HdRezkaApi/__init__.py", line 198, in getStreamSeries
    return makeRequest({
  File "/home/user/miniconda3/lib/python3.10/site-packages/HdRezkaApi/__init__.py", line 173, in makeRequest
    arr = self.clearTrash(r['url']).split(",")
  File "/home/user/miniconda3/lib/python3.10/site-packages/HdRezkaApi/__init__.py", line 105, in clearTrash
    arr = data.replace("#h", "").split("//_//")
AttributeError: 'bool' object has no attribute 'replace'

Debug

> /home/user/miniconda3/lib/python3.10/site-packages/HdRezkaApi/__init__.py(172)makeRequest()                                
    170                         r = requests.post(f"{self.origin}/ajax/get_cdn_series/", data=data, headers=self.HEADERS, proxies=self.proxy)
    171                         r = r.json()
--> 172                         if r['success']:
    173                                 arr = self.clearTrash(r['url']).split(",")
    174                                 stream = HdRezkaStream( season=season, episode=episode,

ipdb> print(r)
{'success': True, 'message': '', 'premium_content': 0, 'url': False, 'quality': False, 'subtitle': False, 'subtitle_lns': False, 'subtitle_def': False, 'thumbnails': False}
ipdb> data
{'id': '1733', 'translator_id': 84, 'season': 1, 'episode': 5, 'action': 'get_stream'}
@SuperZombi SuperZombi added the help wanted Extra attention is needed label Jun 18, 2024
@barl0g
Copy link
Author

barl0g commented Jun 19, 2024

Это, видимо, из-за "К сожалению, это видео не доступно в вашем регионе". Через прокси всё работает. Можно закрывать.

@SuperZombi
Copy link
Owner

The solution: Use a VPN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants