m3u-filter unable to download data from source
Closed this issue · 4 comments
I am able to download using a browser the file:
http://provider.com/player_api.php?username=username&password=secret&action=get_live_categories
http://provider.com/player_api.php?username=username&password=secret&action=get_vod_categories
from http://provider.com/player_api.php?username=username&password=secret&action=get_series_categories
However, m3u filter throws these errors for each of the above:
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] cant download input url: http://provider.com:80/player_api.php?username=username&password=secret&action=get_live_categories => error decoding response body
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] cant download input url: http://provider.com:80/player_api.php?username=username&password=secret&action=get_vod_categories => error decoding response body
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] cant download input url: http://provider.com:80/player_api.php?username=username&password=secret&action=get_series_categories => error decoding response body
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] source is empty http://provider.com:80
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] Source at 0 input is empty
To Reproduce
Steps to reproduce the behavior:
- Go to the web-ui, trigger a sync.
- Watch the log in DEBUG mode.
I tried changing the user-agent but it didn't work. (The current one shown in the logs below is the latest user agent I use, I just copied it from the Chrome networks tab, that was able to get this JSON successfully.)
- OS: m3u-filter running on : raspberry pi4
- Browser I triggerred the refresh request is Firefoc.
- Version Latest : 2.0.1 : https://github.com/euzu/m3u-filter/releases/tag/v2.0.1
- Specifically the binary : https://github.com/euzu/m3u-filter/releases/download/v2.0.1/m3u-filter_v2.0.1_armv7_raspi.tgz
Smartphone (please complete the following information):
- Device: Ipad / Macbook
- OS: ipad OS latest, Macbook: Sonoma: 14.1.2 (23B92) (Both running Smarters player lite)
- Browser : Firefox (for triggerring playlist refresh)
- Version : Latest
Below is the DEBUG log from m3u-filter:
[2024-05-26T15:19:39Z DEBUG m3u_filter::model::config] Processing targets test
[2024-05-26T15:19:39Z INFO actix_web::middleware::logger] 192.168.1.20 "POST /api/v1/playlist/update HTTP/1.1" 200 0 "http://192.168.1.62:8901/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0" 0.000702
[2024-05-26T15:19:39Z DEBUG m3u_filter::utils::request_utils] downloading json content from http://provider.com/player_api.php?username=username&password=secret&action=get_live_categories
[2024-05-26T15:19:39Z DEBUG m3u_filter::utils::request_utils] Request headers {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36", "accept-encoding": "gzip", "accept": "application/json"}
[2024-05-26T15:19:39Z DEBUG reqwest::connect] starting new connection: http://provider.com/
[2024-05-26T15:19:39Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="provider.com"
[2024-05-26T15:19:39Z DEBUG hyper_util::client::legacy::connect::http] connecting to 104.masked.233.masked:80
[2024-05-26T15:19:40Z DEBUG hyper_util::client::legacy::connect::http] connected to 104.masked.233.masked:80
[2024-05-26T15:20:01Z DEBUG m3u_filter::utils::request_utils] downloading json content response code: 200
[2024-05-26T15:20:01Z DEBUG m3u_filter::utils::request_utils] downloading json content from http://provider.com/player_api.php?username=username&password=secret&action=get_vod_categories
[2024-05-26T15:20:01Z DEBUG m3u_filter::utils::request_utils] Request headers {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36", "accept": "application/json", "accept-encoding": "gzip"}
[2024-05-26T15:20:01Z DEBUG reqwest::connect] starting new connection: http://provider.com/
[2024-05-26T15:20:01Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="provider.com"
[2024-05-26T15:20:01Z DEBUG hyper_util::client::legacy::connect::http] connecting to 104.masked.233.masked:80
[2024-05-26T15:20:01Z DEBUG hyper_util::client::legacy::connect::http] connected to 104.masked.233.masked:80
[2024-05-26T15:20:02Z DEBUG m3u_filter::utils::request_utils] downloading json content response code: 200
[2024-05-26T15:20:02Z DEBUG m3u_filter::utils::request_utils] downloading json content from http://provider.com/player_api.php?username=username&password=secret&action=get_series_categories
[2024-05-26T15:20:02Z DEBUG m3u_filter::utils::request_utils] Request headers {"accept-encoding": "gzip", "accept": "application/json", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"}
[2024-05-26T15:20:02Z DEBUG reqwest::connect] starting new connection: http://provider.com/
[2024-05-26T15:20:02Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="provider.com"
[2024-05-26T15:20:02Z DEBUG hyper_util::client::legacy::connect::http] connecting to 104.masked.233.masked:80
[2024-05-26T15:20:03Z DEBUG hyper_util::client::legacy::connect::http] connected to 104.masked.233.masked:80
[2024-05-26T15:20:04Z DEBUG m3u_filter::utils::request_utils] downloading json content response code: 200
[2024-05-26T15:20:04Z INFO m3u_filter::processing::playlist_processor] source is empty http://provider.com:80
[2024-05-26T15:20:04Z DEBUG m3u_filter::processing::playlist_processor] Source at index 0 input is empty
[2024-05-26T15:20:04Z INFO m3u_filter::processing::playlist_processor] {"stats": {"name": http://provider.com:80, "type": xtream, "errors": 0, "raw": {"groups": 0, "channels": 0}, "processed": {"groups": 0, "channels": 0}}}
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] cant download input url: http://provider.com:80/player_api.php?username=username&password=secret&action=get_live_categories => error decoding response body
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] cant download input url: http://provider.com:80/player_api.php?username=username&password=secret&action=get_vod_categories => error decoding response body
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] cant download input url: http://provider.com:80/player_api.php?username=username&password=secret&action=get_series_categories => error decoding response body
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] source is empty http://provider.com:80
[2024-05-26T15:20:04Z ERROR m3u_filter::processing::playlist_processor] Source at 0 input is empty
@gkns i have pushed some chcnages to the master branch, can you build your binary and test it ?
Please ignore earlier deleted comment.
I had switched from my Mac to Linux and had overlooked pulling latest changes.
With the latest changes it is working! Thank you!