It is currently March 29th, 2024, 3:59 pm

Unable to access Bloomburg.com with webparser plugin

Get help with creating, editing & fixing problems with skins
User avatar
Mordasius
Posts: 1167
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Unable to access Bloomburg.com with webparser plugin

Post by Mordasius »

My stock and currency skins accessing Bloomberg.com have both stopped working recently. If I run something like http://www.bloomberg.com/quote/AAPL:US through RainRegExp there is a little bit about

<title>Terms of Service Violation</title>
...

It's not my IP address that is being blocked so I guess it is the webparser plugin.

Anyone got any ideas or suggestions before I abandon all my skins accessing bloomberg.com.
Last edited by Mordasius on July 8th, 2018, 11:26 am, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unable to access Bloomburg.com with webparser plugin

Post by balala »

Mordasius wrote:My stock and currency skins accessing Bloomberg.com have both stopped working recently. If I run something like http://www.bloomberg.com/quote/AAPL:US through RainRegExp there is a little bit about

<title>Terms of Service Violation</title>
...

It's not my IP address that is being blocked so I guess it is the webparser plugin.

Anyone got any ideas or suggestions before I abandon all my skins accessing bloomberg.com.
Post please a code of your skin. I'd try it, to see how is it working or if it does at least.
User avatar
Mordasius
Posts: 1167
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Unable to access Bloomburg.com with webparser plugin

Post by Mordasius »

User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unable to access Bloomburg.com with webparser plugin

Post by balala »

No, they are not working. I get a "RegExp matching error (-1)" message in the log. Will take a look...
User avatar
Mordasius
Posts: 1167
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Unable to access Bloomburg.com with webparser plugin

Post by Mordasius »

Just run http://www.bloomberg.com/quote/AAPL:US as the source in RainRegExp to see the Terms of Service Violation I mentioned. I sure that is where the error lies because I have tried the skin using various IPs and I get exactly the same message.

If you run http://www.bloomberg.com/quote/AAPL:US through your browser and then View Page Source you'll see what the skin RegExps are expecting but don't get using the webparser plugin.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Unable to access Bloomburg.com with webparser plugin

Post by jsmorley »

User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Unable to access Bloomburg.com with webparser plugin

Post by eclectic-tech »

JSMorley beat me! :D
Adding UserAgent to each webparser measure got your skins working for me! :17nodding
User avatar
Mordasius
Posts: 1167
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Unable to access Bloomburg.com with webparser plugin

Post by Mordasius »

Thank you kindly jsmorley for showing the way and eclectic-tech for confirming that UserAgent was indeed the missing ingredient. I've not been paying enough attention to recent Rainmeter updates so had no idea what the UserAgent= option was or when it was introduced.

So I loaded https://www.whatismybrowser.com/detect/what-is-my-user-agent which gave my user agent as
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.9) Gecko/20100101 Goanna/3.4 Firefox/52.9 PaleMoon/27.9.3 when using PaleMoon - my default browser or

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 when browsing with Firefox.

Plugging the UserAgent= value for my default browser in the master Measure for each quote got the skins working as expected.

So now all I need to do is to add a little something to the .rmskin to check what the default UserAgent= value is for anyone downloading my skins is and apply it to the ini files.

Looking forward to that over the weekend (unless of course someone has already coded such a thing and would like to share it - I'm getting lazy).

Thanks Guys.
lizardlord`
Posts: 1
Joined: July 4th, 2018, 8:25 pm

Re: Unable to access Bloomburg.com with webparser plugin

Post by lizardlord` »

Hi - LOVE your skin, and am pretty much a n00b at skin editing (takes me painfully long to figure out what belongs where)!

Can you please clarify exactly where to put UserAgent=mybrowservalue to get it working?

I put beneath each [InfoIndex] and it didn't fix the skin.

Thanks in advance!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Unable to access Bloomburg.com with webparser plugin

Post by eclectic-tech »

lizardlord` wrote:Hi - LOVE your skin, and am pretty much a n00b at skin editing (takes me painfully long to figure out what belongs where)!

Can you please clarify exactly where to put UserAgent=mybrowservalue to get it working?

I put beneath each [InfoIndex] and it didn't fix the skin.

Thanks in advance!
Hi lizardlord!

To get the skins working, you need to add a line:
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0

This must be added to each of the 5 (or 8) [InfoIndex#] sections of each of the 4 skins.
The modded section should look like this:

Code: Select all

[InfoIndex1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=#Quote1#
RegExp=#ExpIndex#
StringIndex=1
UpdateRate=#UpdateQuotes#
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0

You need to add the same line to [InfoIndex1], [InfoIndex2], [InfoIndex3], [InfoIndex4], and [InfoIndex5] for the 5 quotes/market skins. Add it to [InfoIndex6], [InfoIndex7], and [InfoIndex8] sections for the 8 quotes/market skins.

You can find your code by going to WhatIsMyBrowser and copying the agent text it returns (click on the blue boxed text to see the raw text to copy).