xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
2 Pages V < 1 2  
Reply to this topicStart new topic
> Need Help With Gamercard
Demogorge
post May 2 2008, 02:07 AM
Post #16


X-S Enthusiast


Group: Members
Posts: 1
Joined: 2-May 08
Member No.: 380056



D'oh!

I just spent the last hour resolving this problem (after downloading rev 1096 from Blackbolt's site)...

Though the small fix works, you can do slightly better. Here is my code, which goes in the GetGTNFO function of set_gamercard.py and gamercardupdate.py:

CODE

    wsock = urllib.urlopen(str(card_url))
    card_html = wsock.read()
    wsock.close()
    nfo = re.search('<span class="XbcFLAL">([^<]*)</span>.*?<img class="XbcgcGamertile" height="64" width="64" src="([^"]*)".*?<img src="/xweb/lib/images/gc_repstars_external_([^.]*).gif" />.*?<span class="XbcFLAL"><img alt="Gamerscore" src=".*" /></span><span class="XbcFRAR">(.*)</span>.*?<span class="XbcFLAL">Zone</span><span class="XbcFRAR">(.*)</span>', card_html, re.IGNORECASE).groups()
    return nfo


You'll never have to change a 7 to an 8 again, since this parses the whole page, but if the structure of the gamercard html changes too much then you'll of course have to rewrite the regex. This expression can handle some minor changes, which is better than before.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
personman
post May 6 2008, 02:51 AM
Post #17


X-S Enthusiast


Group: Members
Posts: 18
Joined: 24-December 03
Member No.: 84825



QUOTE(Demogorge @ May 2 2008, 02:43 AM) *

D'oh!

I just spent the last hour resolving this problem (after downloading rev 1096 from Blackbolt's site)...

Though the small fix works, you can do slightly better. Here is my code, which goes in the GetGTNFO function of set_gamercard.py and gamercardupdate.py:

CODE

    wsock = urllib.urlopen(str(card_url))
    card_html = wsock.read()
    wsock.close()
    nfo = re.search('<span class="XbcFLAL">([^<]*)</span>.*?<img class="XbcgcGamertile" height="64" width="64" src="([^"]*)".*?<img src="/xweb/lib/images/gc_repstars_external_([^.]*).gif" />.*?<span class="XbcFLAL"><img alt="Gamerscore" src=".*" /></span><span class="XbcFRAR">(.*)</span>.*?<span class="XbcFLAL">Zone</span><span class="XbcFRAR">(.*)</span>', card_html, re.IGNORECASE).groups()
    return nfo


You'll never have to change a 7 to an 8 again, since this parses the whole page, but if the structure of the gamercard html changes too much then you'll of course have to rewrite the regex. This expression can handle some minor changes, which is better than before.



Thanks for this, it works for me!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
NeoTINS
post May 6 2008, 10:55 AM
Post #18


X-S Enthusiast


Group: Members
Posts: 2
Joined: 11-September 04
Member No.: 146290



YES!!! I've been patiently waiting for a fix for this problem. biggrin.gif

Thank you, Demogorge, THANK YOU!! beerchug.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jezz_X
post May 6 2008, 01:55 PM
Post #19


X-S Knowledgebase
********

Group: Moderator
Posts: 4531
Joined: 22-July 03
From: Australia
Member No.: 51477
Xbox Version: v1.1
360 version: none



QUOTE(NeoTINS @ May 6 2008, 08:31 PM) *

YES!!! I've been patiently waiting for a fix for this problem. biggrin.gif

Thank you, Demogorge, THANK YOU!! beerchug.gif

couldn't of been waiting too hard it was fixed Mar 27 2008, 09:56 AM in the SVN if you look back a page
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
devouringone3
post Jan 13 2009, 07:33 AM
Post #20


X-S Enthusiast


Group: Members
Posts: 17
Joined: 13-January 09
Member No.: 402496
Xbox Version: v1.6
360 version: none



EDIT:
Oh shit, I got it, yay thanks!!

cause it worked (after not 1 but 2 xbox reboot) actually!!

biggrin.gif

Its kay




Hummmm.... starting from those two files (set_gamercard.py and gamercardupdate.py) I got in the SVN (Jezz), with or without the line "card_data = card_html[8]", and with the new ip of xbox.com (from 65.59.234.166 to 65.59.234.169) (In Kreten's last thread http://forums.xbox-scene.com/index.php?showtopic=672727).

My Xbox.com GamerCard isn't showing up still sad.gif.

Anyone? Now that I've pretty much tried all I could find here.

I have rev1096 MC360...

Thanks for helping me

This post has been edited by devouringone3: Jan 13 2009, 07:34 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
IAmTheDude360
post Jan 27 2009, 05:59 PM
Post #21


X-S Young Member
*

Group: Members
Posts: 39
Joined: 7-May 08
Member No.: 380496



Me too. Mines not been updating since NXE, am assuming the htmls changed a lot with the introduction of avators. Tis a shame as it was one of the 'bragging features' which I loved to show my friends!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





2 Pages V < 1 2
Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 20th June 2013 - 03:23 AM