It is currently April 23rd, 2024, 6:53 pm
Problem with WebParser: RegExp matching error (-1)
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: Problem with WebParser: RegExp matching error (-1)
Can you post that URL and the regular expression?
-
- Posts: 56
- Joined: July 9th, 2015, 7:40 am
Re: Problem with WebParser: RegExp matching error (-1)
Here is the urlFreeRaider wrote:Can you post that URL and the regular expression?
Code: Select all
https://kat.cr/games/?rss=1
Code: Select all
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url=%22https://kat.cr/games/?rss=1%22
and this is my REGEXP that was working until today
LONG Version
Code: Select all
(?siU)<title>(.*)</title>.*<link>(.*)</link>.*<item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>
Short version
Code: Select all
(?siU)<title>(.*)</title>.*<link>(.*)</link>.*<item>.*<title>(.*)</title>.*<link>(.*)</link>
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: Problem with WebParser: RegExp matching error (-1)
I think that YQL has a connection timeout of 5 seconds, in fact if I test your link, I get this:
-
- Posts: 56
- Joined: July 9th, 2015, 7:40 am
Re: Problem with WebParser: RegExp matching error (-1)
So What should i do ?
Is there is any solution to this
Is there is any solution to this
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: Problem with WebParser: RegExp matching error (-1)
I'm sorry, I have not a solution.
-
- Posts: 56
- Joined: July 9th, 2015, 7:40 am
Re: Problem with WebParser: RegExp matching error (-1)
The solution could be quite simple you know we just have find another APIFreeRaider wrote:I'm sorry, I have not a solution.
i find one
http://api.duckduckgo.com/?q=DuckDuckGo&format=json&pretty=1
but i don't know how to make this api work like yahoo api
-
- Rainmeter Sage
- Posts: 5406
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Problem with WebParser: RegExp matching error (-1)
I believe you are fighting an unwinnable battle with this webmaster.Droyk wrote:So What should i do ?
Is there is any solution to this
Even if a solution is found (I can't find one for you), it appears the webmaster wants the site accessed via a recognizable browser or feed reader. So, if you do find another way to get the info into your skin, the site will be modified again, in the near future, to prevent this.
In the last 3 months:
1) The site changed to prevent webparser from accessing the info
2) You modified your code to use Yahoo's query language and got it working
3) Now the website changed again and is preventing access using the Yahoo query
4) You can access the feed with a browser, but not with any non-browser/feed reader method...
You are right back where you started 3 months ago!
I do not think there is a viable working solution, because the site is constantly changing, preventing all non-browser/feed reader access. This is an unwinnable battle I am not going to fight.
Good luck!
Edit: I see you posted an alternate, but I doubt it will work longer than a month before the website changes again.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Problem with WebParser: RegExp matching error (-1)
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
Item=.*<item>.*<title>(.*)</title>.*<category>(.*)</category>.*<author>(.*)</author>.*<link>(.*)</link>.*<pubdate>(.*)</pubdate>.*</item>
[MeasureSite]
Measure=Plugin
Plugin=WebParser
URL=https://kat.cr/games/?rss=1
Download=1
DownloadFile=kat.xml
FinishAction=[!CommandMeasure MeasureFile "Update"]
[MeasureFile]
Measure=Plugin
Plugin=WebParser
URL=file://#CURRENTPATH#DownloadFile\kat.xml
RegExp=(?siU)#Item##Item##Item##Item##Item#
[MeasureTitle1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureFile]
StringIndex=1
[MeasureCategory1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureFile]
StringIndex=2
[MeasureAuthor1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureFile]
StringIndex=3
[MeasureLink1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureFile]
StringIndex=4
[MeasurePubDate1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureFile]
StringIndex=5
; and so on...
[MeterTitle1]
Meter=String
MeasureName=MeasureTitle1
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
[MeterCategory1]
Meter=String
MeasureName=MeasureCategory1
Y=0R
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
[MeterAuthor1]
Meter=String
MeasureName=MeasureAuthor1
Y=0R
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
[MeterLink1]
Meter=String
MeasureName=MeasureLink1
Y=0R
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
[MeterPubDate1]
Meter=String
MeasureName=MeasurePubDate1
Y=0R
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
; and so on...
One you have the entire .html file saved locally, you can then parse it with WebParser using the file:// protocol instead of http://
I certainly can't promise that this site won't detect this activity and block it as well. Only time will tell.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 56
- Joined: July 9th, 2015, 7:40 am
Re: Problem with WebParser: RegExp matching error (-1)
I think you got it right i should forget about thiseclectic-tech wrote: I believe you are fighting an unwinnable battle with this webmaster.
Even if a solution is found (I can't find one for you), it appears the webmaster wants the site accessed via a recognizable browser or feed reader. So, if you do find another way to get the info into your skin, the site will be modified again, in the near future, to prevent this.
In the last 3 months:
1) The site changed to prevent webparser from accessing the info
2) You modified your code to use Yahoo's query language and got it working
3) Now the website changed again and is preventing access using the Yahoo query
4) You can access the feed with a browser, but not with any non-browser/feed reader method...
You are right back where you started 3 months ago!
I do not think there is a viable working solution, because the site is constantly changing, preventing all non-browser/feed reader access. This is an unwinnable battle I am not going to fight.
Good luck!
Edit: I see you posted an alternate, but I doubt it will work longer than a month before the website changes again.
but i will still try i know this is just a stupid thing to do
but u should think like this not everything is perfect
no matter how much he tries he cant block everything
and u could say the same thing to me too No matter how much i tries i still cant get to everything
-
- Posts: 56
- Joined: July 9th, 2015, 7:40 am
Re: Problem with WebParser: RegExp matching error (-1)
YUP only the time will telljsmorley wrote: If you use Download=1 on a URL, instead of connecting to it and requesting that it return HTML to parse, (which this site will block in WebParser / RainRegExp) it will just treat the entire thing as a "file" and download it. This can often get around issues where a site is checking for a browser user-agent string in the request.
One you have the entire .html file saved locally, you can then parse it with WebParser using the file:// protocol instead of http://
I certainly can't promise that this site won't detect this activity and block it as well. Only time will tell.
and
Thanxxx jsmorley i don't really know how do i thank U
i don't have anything to say right now
i could do just this for U