Need help decompiling a swf player - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Need help decompiling a swf player (/showthread.php?tid=43218)
Pages: 1 2
Need help decompiling a swf player - Nuka1195 - 2009-01-05 21:51
starting video url http://www.weather.com/multimedia/videoplayer.html?clip=649&collection=localwxforecast&from=36hr_bottomnav_business
here is the final video url
of which only http://v.imwx.com/multimedia/video/wxflash/detroit.flv is needed to play it appears.
it appears the only difference between any of the videos is the .flv filename.
what i can't find is what determines the city name. eg New York is newyorkcity.flv, Portland OR is portlandor.flv and Detroit, MI is detroit.flv
here is the wireshark capture.
- digitalhigh - 2009-01-06 00:00
Nuka1195 Wrote:I'm lost
So...you're trying to determine how the city names are assigned to the videos so you can access them directly?
- Nuka1195 - 2009-01-06 00:10
i guess when people say they decompile the swf player, they use software to do it? I see decompilers online.
maybe any tips on which software and what to look for would help.
unless someone would care to spoonfeed me
- digitalhigh - 2009-01-06 00:13
I guess...I'm wondering, what is the end goal of decompiling the swf player? Are you trying to make a script that gives you the forecast?
- Nuka1195 - 2009-01-06 00:44
yes, i want to be able to add videos to "twc supplemental" script
- digitalhigh - 2009-01-06 00:57
Well, those streams are always going to be updated for the city, right? So, in theory, you only need to figure out the names of every video/city once?
Edit: It looks like the video names are just "Cityname.flv", unless there are two states with the same city...you'd just have to go down the list and note which ones are dupes...
Only one that should be different are the Portlands. Every other city is unique. Green Bay is just greenbay.flv.
- BlueCop - 2009-01-06 02:46
I have been looking into to this. I can't seem to find where city lists are coming from. i have been looking at the action script for several of the swf files that the original downloads. i was hoping it would be an xml file or something but no such luck so far. I am sick so i am working kinda slow but i will keep looking till i find the answer. surely they're aren't hard coded in the swf files it would be so inflexible for adding new cities.
- digitalhigh - 2009-01-06 03:20
I must be missing something...why not just make up a list of the major cities in every state, then just have it insert that cityname in a string and have the script see if the URL returns a file. If not, then have it try it with citynameXX where XX is the state initial. It's gotta be one of those two combinations, and if not, then it doesn't exist.
This assumes, of course, that you can have the script try to download a file and report an error if there is no file there...
To determine the cityname, just have it hit a website or list of zip codes/cities...
- BlueCop - 2009-01-06 03:33
Indeed that is possible but it is mostly curiosity for me. I want to know how it works.
so why not? its more future proof to try to use the method that the swf file uses to get the names and urls rather then simply create database of the cities and videos.
I am also curious about the other videos available on the site and they aren't as simple as city names.
- Nuka1195 - 2009-01-06 03:36
Thanks to both of you.
BlueCop, don't strain you self, but if you figure it out. that would be great.
digitalhigh, i took what you said earlier and do exactly as you just posted. except i also have to try cityname"city" for newyorkcity.
in the original page there is a code omn_dma_code to find what city you have a local video for. that is in dma_names[code_number]. i then take omn_locstate, for the citynameXX test.
the problem is some cities don't have a local video, but a regional one, where the above doesn't work.
while this works fine for me, i would like it to work for other cities.
so if BlueCop can figure this out, it would be more universal.