JDALab / film-central

A mov-cli plugin for watching Films and Shows.
MIT License
13 stars 0 forks source link

Parse error(?) #4

Closed Edvinest closed 1 month ago

Edvinest commented 1 month ago

For the last few days I couldn't watch any episode of any shows. I get a long error which ends with 'AttributeError'.

Fraei2 commented 1 month ago

Could you send a full log with --debug?

Edvinest commented 1 month ago
[DEBUG] (mov_cli) - Scraper args picked up on --> []

[INFO] (mov_cli) - Using 'films.DEFAULT' scraper...
[INFO] (mov_cli) - Searching for 'smiling friends'...
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://api.themoviedb.org/3/search/movie?query=smiling friends&include_adult=false&language=en-US&page=1&api_key=d39245e111947eb92b947e3a8aacc89f
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://api.themoviedb.org/3/search/tv?query=smiling friends&include_adult=false&language=en-US&page=1&api_key=d39245e111947eb92b947e3a8aacc89f
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/movie/1302346
[DEBUG] (mov_cli) - [HTTPClient] GET Request to 'https://vidsrc.to/embed/movie/1302346' failed! (<Response [404 Not Found]>)
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/movie/428126
[DEBUG] (mov_cli) - [HTTPClient] GET Request to 'https://vidsrc.to/embed/movie/428126' failed! (<Response [404 Not Found]>)
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/tv/126506/1/1
[DEBUG] (mov_cli) - [prompt] Skipping prompt as there is only a single choice to choose from...
[INFO] (mov_cli) - Scrapping episodes for 'Smiling Friends'...
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://api.themoviedb.org/3/tv/126506?language=en-US&append_to_response=episode_groups,alternative_titles,credits&api_key=d39245e111947eb92b947e3a8aacc89f
[INFO] (mov_cli) - Scrapping media for 'Smiling Friends'...
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/tv/126506/2/6
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/ajax/embed/episode/ofBjP8tr/sources
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/ajax/embed/source/ofRjM85rUQ==
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://github.com/Ciarands/vidsrc-keys/blob/main/keys.json
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidplay.online/futoken
[DEBUG] (mov_cli) - [HTTPClient] GET Request to 'https://vidplay.online/futoken' failed! (<Response [403 Forbidden]>)
[CRITICAL] (mov_cli) - An error occurred inside a plugin. This is MOST LIKELY not a mov-cli error, make SURE mov-cli and your plugins are up to date. Also report this to the plugin, not mov-cli! 
Error: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
  File "/home/edvinest/.local/bin/mov-cli", line 8, in <module>
    sys.exit(app())
             ^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/mov_cli/cli/__main__.py", line 154, in app
    uwu_app()
  File "/home/edvinest/.local/lib/python3.12/site-packages/typer/main.py", line 326, in __call__
    raise e
  File "/home/edvinest/.local/lib/python3.12/site-packages/typer/main.py", line 309, in __call__
    return get_command(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/typer/core.py", line 661, in main
    return _main(
           ^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/typer/core.py", line 193, in _main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/typer/main.py", line 692, in wrapper
    return callback(**use_params)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/mov_cli/cli/__main__.py", line 115, in mov_cli
    media = scrape(choice, chosen_episode, chosen_scraper)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/mov_cli/cli/scraper.py", line 28, in scrape
    handle_internal_plugin_error(e)
  File "/home/edvinest/.local/lib/python3.12/site-packages/mov_cli/cli/plugins.py", line 59, in handle_internal_plugin_error
    raise e
  File "/home/edvinest/.local/lib/python3.12/site-packages/mov_cli/cli/scraper.py", line 26, in scrape
    media = scraper.scrape(choice, episode)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/film_central/vidsrcto/scraper.py", line 77, in scrape
    url = vidplay.resolve_source(vidplay_url)[0]
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/film_central/vidsrcto/ext/vidplay.py", line 104, in resolve_source
    futoken = self.get_futoken(key, url, provider_url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edvinest/.local/lib/python3.12/site-packages/film_central/vidsrcto/ext/vidplay.py", line 82, in get_futoken
    fu_key = re.search(r"var\s+k\s*=\s*'([^']+)'", req.text).group(1)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
spjz commented 1 month ago

Yeah I get the same issue intermittently. Seems to be down right now

haha-lolcat commented 1 month ago

Same thing here. It started happening about 1-2 weeks ago.

Jagadishwar49 commented 1 month ago

Same issue for me also Error: 'NoneType' object has no attribute 'group' When ever I try to play video in film centeral I'm getting error

Full log :

[CRITICAL] (mov_cli) - An error occurred inside a plugin. This is MOST LIKELY not a mov-cli error, make SURE mov-cli and your plugins are up to date. Also report this to the plugin, not mov-cli! Error: 'NoneType' object has no attribute 'group' Traceback (most recent call last): File "/data/data/com.termux/files/usr/bin/mov-cli", line 8, in sys.exit(app()) ^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/mov_cli/cli/main.py", line 154, in app uwu_app() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/typer/main.py", line 326, in call raise e File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/typer/main.py", line 309, in call return get_command(self)(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/typer/core.py", line 661, in main return _main( ^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/typer/core.py", line 193, in _main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/typer/main.py", line 692, in wrapper return callback(use_params) ^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/mov_cli/cli/main.py", line 115, in mov_cli media = scrape(choice, chosen_episode, chosen_scraper) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/mov_cli/cli/scraper.py", line 29, in scrape handle_internal_plugin_error(e) File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/mov_cli/cli/plugins.py", line 48, in handle_internal_plugin_error raise e File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/mov_cli/cli/scraper.py", line 27, in scrape media = scraper.scrape(choice, episode) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/film_central/vidsrcto/scraper.py", line 77, in scrape url = vidplay.resolve_source(vidplay_url)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/film_central/vidsrcto/ext/vidplay.py", line 104, in resolve_source futoken = self.get_futoken(key, url, provider_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/film_central/vidsrcto/ext/vidplay.py", line 82, in get_futoken fu_key = re.search(r"var\s+k\s=\s'([^']+)'", req.text).group(1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'group'

OS : ANDROID 14

psynt commented 1 month ago

Added a print statement to see that req. Unfortunately,

<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>
haha-lolcat commented 1 month ago

my guess is that it happened due to the attempt to move from mov-cli-films to film-central. the latest change I see is the removal of mov-cli-films from pyproject.toml: https://github.com/JDALab/film-central/compare/a2f2cb4e50c8b74e0b98678f1a27c87a44dec4b9...ce2df8574ee62fb38c65014060a2d7bd3f912c6d

Fraei2 commented 1 month ago

my guess is that it happened due to the attempt to move from mov-cli-films to film-central. the latest change I see is the removal of mov-cli-films from pyproject.toml: a2f2cb4...ce2df85

It has nothing to do with that, the provider is changing domains frequently.

Also i will close this issue. #5