1

Because raptr is closing sooner or later I want to save all my play data. I can access first tab but that's it. How can I get data from 2nd, 3rd etc (It's at the bottom of the screen)?

enter image description here

My code:

import urllib2
page = urllib2.urlopen('http://raptr.com/john/games')
data = []
for line in page:
    if "game\/" in line:
        data.append(line)

sorter = []

for i in data:
    sorter.append(i.split("game\/"))

games = []

for lst in sorter:
    for part in lst:
        if "game-title" in part:
            games.append(part)

for game in games:
    print(game)

P.S. I know about file but this file does't have all information I've uploaded to to the web page

Xantium
  • 11,201
  • 10
  • 62
  • 89
Hsin
  • 307
  • 5
  • 15
  • 1
    Check if the URL is changing, on click of pages `2, 3, 4 etc.`! If it's changing then first of all grab all different URLs, store them in a list and do what you are doing currently for each value of list. If not then you have to crawl data on each navigation, that's a bit tricky. – the.salman.a Mar 22 '18 at 07:50
  • It doesn't I checked. I don't know if I can change it through url. Someone that knows how web pages are built is needed. – Hsin Mar 22 '18 at 07:52
  • 1
    Can you give the URL of the page, from where you took screenshot. I am not able to find it. – the.salman.a Mar 22 '18 at 07:53
  • It's in code. Here you are http://raptr.com/john/games – Hsin Mar 22 '18 at 07:54
  • 1
    Have you used Selenium? You can do it, using Selenium. – the.salman.a Mar 22 '18 at 07:55
  • I'm not familiar with the library or service. It's library right? – Hsin Mar 22 '18 at 08:00

0 Answers0