Jump to content

New/Better/Easier method: Fiddler2 Proxy Plugin


liquidcool

Recommended Posts

Wow this is working excellently! Just loaded it up in IE 7 using version 1.0.0.2, using flash 9, if that even matters. How would we be able to use FF instead?

What are the available rates for Mp3 conversion?

Thanks so much!

Link to post
Share on other sites
  • Replies 160
  • Created
  • Last Reply

@kickarse: the official url to say how to load it up with firefox is here: http://www.fiddler2.com/Fiddler/help/hookup.asp#Q-NonIE

but basically just go to Tools --> Options... --> Advanced --> Network --> Settings... --> Automatic proxy configuration URL:

and type in file:///C:/your_path_to_my_documents/Fiddler2/Scripts/BrowserPAC.js

mine is: file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/Fiddler2/Scripts/BrowserPAC.js

----

found a bug in 1.0.0.2 ... if you un-check convert to mp3, the album art is not saved. I already fixed it, but will wait for more changes to release the code.

Link to post
Share on other sites

Also just got this error... Seems as though there was an issue with fiddler and the profile in pandora.

---------------------------

Sorry, you may have found a bug...

---------------------------

Fiddler has encountered an unexpected problem. If you believe this is a bug in Fiddler, please copy

this message by hitting CTRL+C, and submit a bug report using the Help | Send Feedback menu.

Index and length must refer to a location within the string.

Parameter name: length

at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)

at System.String.Substring(Int32 startIndex, Int32 length)

at Saver.AutoTamperResponseAfter(Session oSession) in C:\Documents and Settings\Keith\Desktop\PandoraSaver\PandoraSaver\Saver.cs:line 198

at Fiddler.FiddlerExtensions.DoAutoTamperResponseAfter(Session oSession)

at Fiddler.Session.Execute(Object objThreadstate)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPool

WaitCallback tpWaitCallBack)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

mscorlib

Fiddler v2.2.0.5 [.NET 2.0.50727.1433 on Microsoft Windows NT 5.1.2600 Service Pack 2]

---------------------------

OK

---------------------------

Link to post
Share on other sites

All new versions of the fiddler2 plugin will now be mirrored at the following url on my site when I get them. The old links in previous posts will be maintained for the time being.

http://www.haldrie.com/files/pandorasaver

I'm trying the new version now and so far it's working well. I have made a batch script that I am using to copy out the original mp4s so that I can still convert to mp3 while keeping the mp4s and I may upload it in the near future once I feel it has been perfected.

Link to post
Share on other sites
What are the available rates for Mp3 conversion?
Common bit rates are: 8 16 32 48 56 64 80 96 112 128 144 160 192 224 256 320

(... should I include a drop down menu for this?)

Also just got this error... Seems as though there was an issue with fiddler and the profile in pandora.
Thanks for the log, found the problem and added a check to hopefully prevent it.

All new versions of the fiddler2 plugin will now be mirrored at the following url on my site when I get them. The old links in previous posts will be maintained for the time being.

I'm trying the new version now and so far it's working well. I have made a batch script that I am using to copy out the original mp4s so that I can still convert to mp3 while keeping the mp4s and I may upload it in the near future once I feel it has been perfected.

You know you can edit your above post and change the url of the link you provided. I have edited mine to include your new links.

Also .. I'm open to feature requests. You really don't have to create a batch file to do this, just ask me to implement it.

Link to post
Share on other sites

1.0.0.3

Changelog:

bugfix: if you had un-checked convert to mp3, the album art was not saved

bugfix: error parsing xml file if audio url was to short

made deleting the mp4 after conversion optional

external process have a max process time of 5 minutes each

added a sweet javascript refresh timer (‘twas originally made for greasemonkey, but should work fine)

http://www.filesavr.com/pandorasaver1003

http://www.filedropper.com/pandorasaver1003

http://www.filefactory.com/file/5ae436/n/P...raSaver1003_zip

http://meiskam.yi.org/upload/files/PandoraSaver1003.zip

http://www.fileqube.com/file/lsQKoC159583

Link to post
Share on other sites

This is definitely the best app for pandora ive used so far. Is there any way the app could optionally store per radio station, and even better continuously add new files into a m3u playlist? Either way, keep up the great work, exciting to see whats next :)

Link to post
Share on other sites
Should we throw this up on a common source page we can all work on? Sourceforge?
Personally, I've never developed an application on SourceForge and don't know how. But if you set it up, I'm sure it wouldn't be that hard to figure out. I've included the source in each release, and haven't changed anything on my local box since uploading 1.0.0.3. Also to note: I would love to have some help :). Oh yeah, and if possible, I would like to have a place where the developers can speak privately.

Also .. I'm about half way through making another program that does the same thing this one does, but does not rely on Fiddler2, which I personally would rather work on that with you than continue this one that needs a clunky proxy to attach to. ('tis written in C, btw)

Link to post
Share on other sites
Also just got this error... Seems as though there was an issue with fiddler and the profile in pandora.

---------------------------

Sorry, you may have found a bug...

---------------------------

Fiddler has encountered an unexpected problem. If you believe this is a bug in Fiddler, please copy

this message by hitting CTRL+C, and submit a bug report using the Help | Send Feedback menu.

Index and length must refer to a location within the string.

Parameter name: length

at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)

at System.String.Substring(Int32 startIndex, Int32 length)

at Saver.AutoTamperResponseAfter(Session oSession) in C:\Documents and Settings\Keith\Desktop\PandoraSaver\PandoraSaver\Saver.cs:line 198

at Fiddler.FiddlerExtensions.DoAutoTamperResponseAfter(Session oSession)

at Fiddler.Session.Execute(Object objThreadstate)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPool

WaitCallback tpWaitCallBack)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

mscorlib

Fiddler v2.2.0.5 [.NET 2.0.50727.1433 on Microsoft Windows NT 5.1.2600 Service Pack 2]

---------------------------

OK

---------------------------

I get this error too, and it doesn't rip anything! :(

Link to post
Share on other sites
This is definitely the best app for pandora ive used so far. Is there any way the app could optionally store per radio station, and even better continuously add new files into a m3u playlist? Either way, keep up the great work, exciting to see whats next :)

i second both suggestions. also, total n00b question here, but is there anyway to save only songs that are rated a thumbs up? and let me throw my thanks into the ring too. job well done. by far the best and easiest method, and it actually works..all the time!

Link to post
Share on other sites

One other request lol, Ive been looking at applications that embed the .jpg into a mp3 (such as tag&rename) and they all use a file that is by default folder.jpg (instead of album.jpg) is there any way the albums could be named this instead?

Link to post
Share on other sites

Has anyone tried this? ....

I opened about 6 tabs in IE, all running pandora, eventually they all quit playing music and seem to lock up. But if you check the folder fiddler is ripping your music to, it is recording songs about every 10 - 20 seconds, non-stop. They work too! Weird, but seems to still be working for me for about 2 hours now! hah

EDIT: Although it does seem to only work if they are all playing the same station, and it misses a few album art here and there

Link to post
Share on other sites

Hey, just tried out the new edited version of PandoraSaver, and It worked for a few minutes, but the n I get this error:

---------------------------

Sorry, you may have found a bug...

---------------------------

Fiddler has encountered an unexpected problem. If you believe this is a bug in Fiddler, please copy

this message by hitting CTRL+C, and submit a bug report using the Help | Send Feedback menu.

The given path's format is not supported.

at Saver.HandlePendingSessions() in C:\Documents and Settings\Keith\Desktop\PandoraSaver\PandoraSaver\Saver.cs:line 330

at Saver.bw() in C:\Documents and Settings\Keith\Desktop\PandoraSaver\PandoraSaver\Saver.cs:line 78

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

PandoraSaver

Fiddler v2.2.0.7 [.NET 2.0.50727.1434 on Microsoft Windows NT 6.0.6001 Service Pack 1]

---------------------------

OK

---------------------------

....and I don't have a 'Keith' folder... ;)

Link to post
Share on other sites
  • 2 weeks later...

Been using this, great program, far superior to Pandora's Jar, imo. (and fiddler2 is right handy as well by itself).

Created another modified version, to address some shortcomings I found. Primary thing is it fixes path errors and now tags mp4s (and saves album arts for them)

Seeing as I didn't want mp3s because of their lower quality/re-encoding, larger filesize (2x +), and heavy cpu use while transcoding, I chose to not convert the files (aac ftw). But, by default, if the saver is not going to convert them it just drops the mp4 in the folder without any tagging at all (or album art).

Added/Changed Features:

Option to only download thumbs-up songs. (note - if you thumbs up a song when listening to it, it will not be downloaded until the next play.) Option to only download songs on command - this is "view songs" on the pandorasaver menu or the tray icon Tray icon - same options as pandorasaver menu. disableable in settings. Adds tags + album art to mp4 files - album arts will be saved as png if using mp4 (format restriction). Adds support for custom save format - use tags like %artist%, %album%, and %genre% to customize where it saves files. I have not implemented custom filenames, but that would be a trivial thing to implement if people want it. *NEW* Can also use "%sid%" to sort by station ID and %station% to sort by station name *NEW* Log viewer window to see how many songs were sniffed/ripped + any other activity (and errors). Open it on the pandorasaver menu on fiddler2 window Adds new files to a m3u playlist "newMusik.m3u" in the root of the save dir Fixes errors in path due to periods, and general readability. They are now removed completely (except for the ext, ofc) "..." is replaced with a single space for sake of readability

Now checks for mp3 files already being present when saving files, and will not save a mp4 file if there is an mp3 already (if you were using mp3 and stopped, or such) Formats names nicely - no multiple underscores or spaces in names. Also, will not end names with a space or underscore. Tags in mp3s + and m4as will not have underscores for chars like ?/\: etc Option to always update tags on files (even if it has been already tagged) Put associated station name in publisher/composer field Check for non-aac streams (which would cause a problem. I don't know if it is possible, but it is best to check just in case) Will not save responses shorter than 100kb (I noted this happening a few times)

Features from 1003-

Terminates proccesses that go longer than 5 minutes

Download at http://zzj.itf-inc.com/PandoraSaver1005-ZZJ.zip, source etc within. (1.2mb)

To use, copy ALL the files in \bin to <ProgramFilesDir>\Fiddler2\Scripts, overwriting any old versions of PandoraSaver.dll. Do note, there is a new EXE that needs to be copied - mp4tags.exe (used for tagging mp4s)

Notes/Errata/Etc:

Use Flash 9 or 10 with this - 8 now returns mono files (and may not be in aac format).

Do NOT use iTunes to decode saved mp4 files! It is not capable of using HE AAC's SBR properly and thus falls back to LC aac - in short, it will sound very poorly! Use a decoder based on libfaad2 like ffmpeg (codec), or a player like winamp or vlc which have support built in.

To enable logging create a blank txt file named "Log.txt" in the root of save folder. Alternatively use the "Log viewer" option - the log will be helpful if something is not working, instead of posting "it doesn't work onnoes halp". Doubleclick anywhere in the log window and it will copy the last 50 lines to your clipboard.

If you do not set a filter to dump old requests in Fiddler2 it will *eat* memory and eventually crash, because it keeps all requests in memory, along with their responses (IE the big files downloaded). To fix this, in the fiddler2 main window click the filters tab, and check "Use Filters". then, at the bottom, check the box that says "Keep only the most recent 200 sessions" I find it still eventually will fail but it last a *lot* longer. (and doesn't use 2gb of ram)

Fiddler.exe that was in the bin/Debug folder does NOT need to be copied to the scripts directory (along with the Xceed* dlls). it has been moved to /src (required so the compiler knows what it exports) Just leave it alone, do not move or mess with it - it has been added to the project so the compiler can still find it.

A diff file detailing changes in code between this and 1002 is within the ZIP

This was derived from 1002, but now incorporates some features from 1003 as well: namely the check for bad url/too long and terminated hung processes. I didn't bring the timer as i didn't really thing it necessary. wouldn't be hard to add it, though. Hmm, the url check doesn't work properly (because by default ALL values are longer than they should be?) Somehow the fiddler seems to know the correct length...need to figure out how this is done.

I have the command for piping faad's output into lame (and avoiding the use of a wav file completly) inserted in the source, however, C#'s proccess utils blow goats and it's just too much effort to setup a pipe using inbuilt commands. But, it won't let cmd.exe launch properly to do the piping for us, so...Maybe someone else can complete it.

Uses spaces rather than underscores for invalid chars, looks a bit nicer. Also, it only allows single spaces in filenames, in the case of consecutive invalid chars.

It would be possible to download a song immediately when rated positively, if it were to check for the feedback POST (url containing "method=addFeedback") and then take the 3rd arg "arg3" which is the ID of the song. however, the method to handle sessions would have to be reworked so it didn't delete songs that were not positively rated until a few minutes after from the session-queue. (to allow for rating after the fact). after it has found that request, it would have to set the 'rating' field of the session to the value of "methodResponse" of the feedback POST.

Last updated: 10:39pm 1/12/09

edit Hmm, just saw Hobbit's post about making a c-based version of this. (though it has been a few weeks with no result...?) To be honest, I like this method better because Fiddler2 is handy in its own right. Also, how do you plan on making a similar functionality without re-implementing the proxy entirely, or using a separate browser? Somehow you have to get the requests to go through a facility that the program can grab from, which is really limited to using a proxy(somewhat nasty) or forcing pandora.com to resolve to the local server (really nasty)

Basically, while it is possible, why bother? It would be quite a pain, imo. Points for using C++ however, as I still don't like bytecode/heavy implementation languages that need a runtime such as java and .net - the latter being the lesser of 2 evils.

Having no dependencies on outside dlls or programs would be nice, but it's impractical.

Link to post
Share on other sites

since a few people seem to be having problems with it, I will probably make a installer for it, that way the whole process can be more automated.

if i get it working, It will be a more standalone version where it wont change any system settings, and only firefox portable will use it. that way firefox and fiddler will be set up perfectly to work with no problems

because some sites fail to load when fiddler is running and the browser is using it as a proxy

so a more standalone solution will be easier to install and be up and running

Link to post
Share on other sites

Hmm, yeah, that would be a good idea. I will make this use an ini file in the fiddler dir, instead of the registry to aid portability.

I had noticed some websites were quirky with fiddler, but on the whole it's far too useful to give up. So handy

Only thing that you need to check is if fiddler uses the registry itself, otherwise I don't see any problems

Link to post
Share on other sites

by default it rips every song, and if you check the option to only rip songs with a thumbs up, it doesn't rip anything

it requires the song to be thumbs up in advanced for it to rip

frustrating when you just discovered a new song and want it to rip so you click thumbs up to rip it but it doesn't because it already gave up the second the song started because it didn't detect the thumbs up the second the song started

if this issue cant be fixed then it would be helpful it it can at least add a button that can be click to manually initate a track rip like in pandoras jar

PS making good progress on the installer

just wondering if everyone is ok with adding a registry entry

the program requires a registry file for it's settings with out it it just uses the defaults which wont work

so i was thinking of adding this registry entry

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Fiddler2]
"StartupCount"="0"
"FontSize"="8.25"
"AttachOnBoot"="False"
"AllowRemote"="False"
"ReuseServerSockets"="True"
"ReuseClientSockets"="False"
"FiddlerBypass"=""
"ReportHTTPErrors"="True"
"UseGateway"="True"
"CaptureCONNECT"="True"
"CaptureFTP"="False"
"EnableIPv6"="False"
"BreakOnImages"="False"
"CollectRPASpy"="True"
"MapSocketToProcess"="True"
"UseAESForSaz"="False"
"AutoStreamAudioVideo"="True"
"CaptureHTTPS"="False"
"IgnoreServerCertErrors"="False"
"CheckForUpdates"="True"
"HookAllConnections"="False"
"ShowProcessFilter"=dword:00000000
"AutoReloadScript"="True"
"HideOnMinimize"="False"
"AlwaysShowTrayIcon"="False"
"ListenPort"=dword:000022b8
"HotkeyMod"=dword:00000003
"Hotkey"=dword:00000046
"CheckForISA"="True"
"ScriptReferences"=""
"JSEditor"="notepad.exe"

[HKEY_CURRENT_USER\Software\Microsoft\Fiddler2\UI]
"frmViewer_WState"=dword:00000000
"frmViewer_Top"=dword:00000065
"frmViewer_Left"=dword:00000188
"frmViewer_Height"=dword:000001dd
"frmViewer_Width"=dword:000003f0
"StackedLayout"="False"
"AutoScroll"="True"
"SmartScroll"="True"
"ResetCounterOnClear"="True"
"pnlSessions_Width"=dword:00000190
"tabsRequest_Height"=dword:000000f5
"lvSessions_order"="0,1,2,3,4,5,6,7,8,9,10"
"lvSessions_widths"="45,50,55,120,150,52,60,80,60,80,60"

[HKEY_LOCAL_MACHINE\SOFTWARE\PandoraSaver]

[HKEY_LOCAL_MACHINE\SOFTWARE\PandoraSaver\PandoraSaver]
"reloadtime"="60"
"convert"="1"
"positive_only"="0"
"bitrate"="256"
"path_fmt"="\\"
"savepath"="C:\\PandoraFox\\MP3"
"enabled"="True"

installing the registry file will be entirely optional, I will add a option in the installer for them to install the registry file for the settings

Link to post
Share on other sites
* Option to only download thumbs-up songs. (note - if you thumbs up a song when listening to it, it will not be downloaded until the next play.)

Notes/Errata/Etc:

...

It would be possible to download a song immediately when rated positively, if it were to check for the feedback POST (url containing "method=addFeedback") and then take the 3rd arg "arg3" which is the ID of the song. however, the method to handle sessions would have to be reworked so it didn't delete songs that were not positively rated until a few minutes after from the session-queue. (to allow for rating after the fact). after it has found that request, it would have to set the 'rating' field of the session to the value of "methodResponse" of the feedback POST.

It's possible to do it, it just needs some more code. I'll look into after I am finished beating XML with a large stick to make a config file.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...