atulya2109 / Stats-Royale-Python

Stats Royale web Scrapper for clash royale
MIT License
17 stars 4 forks source link

Selenium on server #4

Closed atulya2109 closed 7 years ago

atulya2109 commented 7 years ago

Can we use selenium web driver on a server. If we implement it in our code i don't believe it will work when we create a server to run the api's.

ritiek commented 7 years ago

http://statsroyale.com/profile/<tag>/refresh seems to be working for refreshing profiles.. Let's just stick to requests and flask. I think they would do fine.

atulya2109 commented 7 years ago

and what about battles

ritiek commented 7 years ago

I will work on it too

atulya2109 commented 7 years ago

How did you know it was refresh instead of refreshprofile

ritiek commented 7 years ago

Just sniff your packets using mitmproxy (https://github.com/mitmproxy/mitmproxy)

atulya2109 commented 7 years ago

Okay that is something new but i ll go through it asap

ritiek commented 7 years ago

Our tool will have to pause for 20 secs too when refreshing profiles. Is that okay?

atulya2109 commented 7 years ago

The url is called after twenty seconds of clicking or the results take twenty seconds .

ritiek commented 7 years ago

I mean when we refresh the profile on statsroyale.com, it asks us to wait for 20 secs. So our tool too will wait till the time statsroyale.com updates itself.

atulya2109 commented 7 years ago

We ll go with twenty seconds for now

atulya2109 commented 7 years ago

Or we can dig deep to find a way to get the json response directly.

atulya2109 commented 7 years ago

Is that evwn possible i think we will stick to twenty seconds for now

ritiek commented 7 years ago

No, I don't think that will be easy. I don't play clash royale and I don't even know how that site fetches profiles. 20 secs ok then.

atulya2109 commented 7 years ago

There is no official CR api and they are pulling the values from the game after reverse engineering it.