New version and scripting

Sort:
Avatar of Dale00007

Hello,

I am using few parsing scripts created in .php to parse some of pages on old chess com in order to automate some of the management of Chess960 WCL league and my teams Team Prague, Team Czech Republic and Slavia Prague. After todays switch of primary site to new version - all my scripts are failing. 

a) Is there some link, through which I can call directly pages on the old chess com? Especially team match pages and member pages

b) have you considered some API or another approach, how 3rd party pages or apps can access Chess.com content? I have looked on html source code of new version and I dont think it can be parsed with my level of knowledge.

 

Thanks for your advices, because if I wont be able to automate some of my work as of now, it will force me to drop some of the activity - ie managing of Chess960 WCL, which is in the current season giving fun to more than 1000 members.

 

Thanks,

Petr

Avatar of bcurtis

Hi, Petr.

Yes, we are working on an API for exactly this sort of thing. In fact, I would appreciate if you told me the specific data you are collecting, so that we have something specific to shoot for.

 

In the meantime, you can have your scripts access the old v2 pages by adding a cookie to your request. The cookie header should be "Cookie: app=v2;"

 

I can't promise that v2 will be around until that API is available, so you should try to see if you can obtain the data from the v3 pages in the meantime.

 

Hope that helps!

- Ben

Avatar of Dale00007

Hi Ben,

 

thanks for your quick feedback. I dont have much experience with cookies, but I will try to find, how to call such page with .php tomorrow.

 

In relation to data, I am using at this moment only 3 pages:

A) team match details - registration start, start date, end date, scores, players per team

- information from all boards - player 1 and 2, score 1 and 2

- called through matchid

B) member page: last login date, date joined, city, country, number of active online matches

- called through user name

C) member search page with filter on Czech republic: user name, city, country

- called directly - http://www.chess.com/members/search?name=&country=Czech+Republic&page=$i

 

Regards, Petr

 

Avatar of Dale00007

After few failures a was able to call and parse one old page successfully. Thanks.

Let me know if you need any more information about my needs.

In relation to parsing of new pages, I dont have idea, how to parse C. A and B seems possible, but much much more difficult than old version. I would appreciate if some api or ie legacy page showing just information above can be created once v2 is shutdown. Thanks.

Avatar of Dale00007

Hi Ben,

are there already some plans about disabling of v2 or on the other hand enabling some api or another way to use data from chess.com? I have to say that my attempts to screensrap v3 failed. So I am thinking if I should still improve my pages based on v2 or prepare for something else.

Thanks. Petr