This project has moved. For the latest updates, please go here.

When source url have chinese code

Jan 16, 2015 at 7:32 AM
I have a url : http://pchlscc4.imgo.tv/d3a38df9060695cd39de5ecf6c79e262/54b89371/jinying/w/jinying/%e6%b9%96%e5%8d%97%e5%8d%ab%e8%a7%86/knkhy121231a1new.fhv/playlist.m3u8

But program have auto convter to chinese : MediaStreamFacadeBase.CreateMediaStreamSourceAsync() http://pchlscc4.imgo.tv/d3a38df9060695cd39de5ecf6c79e262/54b89371/jinying/w/jinying/湖南卫视/knkhy121231a1new.fhv/playlist.m3u8
HttpClientWebReaderManager.DetectContentTypeAsync() url ext "http://pchlscc4.imgo.tv/d3a38df9060695cd39de5ecf6c79e262/54b89371/jinying/w/jinying/湖南卫视/knkhy121231a1new.fhv/playlist.m3u8" type M3U8 (application/vnd.apple.mpegurl)

And the website can't support chinese character. so debug.write

A first chance exception of type 'System.Exception' occurred in SM.Media.Platform.WinRT.DLL
WinRT information: Response status code does not indicate success: 403 (Forbidden).
Jan 16, 2015 at 7:53 AM
I try.
convter chinese, after new uri("xxx")
Coordinator
Jan 16, 2015 at 9:09 PM
Are you sure this isn't just a side effect of the debug output doing the translation? I tried the original URL with chrome, "curl" (the command line tool) and VLC and all fail with 403s (access denied).
Jan 18, 2015 at 3:07 PM
I use download tools can. But use browser can't.
Coordinator
Jan 18, 2015 at 9:18 PM
gzwzj wrote:
I use download tools can. But use browser can't.
If you can trace that tool's traffic with something like Fiddler or Wireshark, then you can see the exact request bytes that were used to get a proper response. Things to pay particular attention to: cookies, the user agent, and the referrer. It should be possible to create an identical request with that information.

If the stream uses a rapidly changing url (those long hex numbers are suspicious), then one may need to figure out where to fetch a current one (e.g., by scraping a web page).