Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 3 of 3 FirstFirst 123
Results 51 to 66 of 66
Like Tree14Likes
  1. #51  
    firstness's Avatar

    Posts
    18 Posts
    Global Posts
    51 Global Posts

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    I'm using Chrome Page Monitor I haven't got any change notifications since the bumper case became available. Maybe your refresh interval is too short?

    I'm in Canada btw.

    Edit: I'm using 60 s interval.
  2. Thread Author  Thread Author    #52  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by firstness View Post
    I'm using Chrome Page Monitor I haven't got any change notifications since the bumper case became available. Maybe your refresh interval is too short?

    I'm in Canada btw.

    Edit: I'm using 60 s interval.
    Ya, not sure what keeps changing, but it hasn't changed ALL DAY and now it keeps sending emails. I am refreshing every 30 sec, and have been all day.
  3. #53  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Maybe it's better just to parse the page and check for "Coming soon"?
  4. #54  
    Ziptied's Avatar
    Your Resident Googler

    Posts
    537 Posts
    Global Posts
    769 Global Posts
    ROM
    Stock

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by kanetheninja View Post
    Maybe it's better just to parse the page and check for "Coming soon"?
    nah, i'd leave it, it caught the bumper
    Google it.
  5. #55  
    firstness's Avatar

    Posts
    18 Posts
    Global Posts
    51 Global Posts

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by firstness View Post
    I'm using Chrome Page Monitor I haven't got any change notifications since the bumper case became available.
    Never mind, the yellow box just disappeared on me...
  6. #56  
    Ziptied's Avatar
    Your Resident Googler

    Posts
    537 Posts
    Global Posts
    769 Global Posts
    ROM
    Stock

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by firstness View Post
    Never mind, the yellow box just disappeared on me...
    id did for me too, but now its back.
    Google it.
  7. Thread Author  Thread Author    #57  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by Ziptied View Post
    id did for me too, but now its back.
    And now it seems gone....They are killing me.
  8. Thread Author  Thread Author    #58  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Sorry for spamming you all, but It is just because google keeps updating the page. I assume if you sent me your email you are OK with getting notified when Google changes the Nexus 4 8GB or 16GB page.

    Thanks,
    Blake
  9. #59  
    firstness's Avatar

    Posts
    18 Posts
    Global Posts
    51 Global Posts

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by BCVisin View Post
    And now it seems gone....They are killing me.
    I wonder if this is the result of various google cloud servers receiving updates at different times. Perhaps once N4 sales go live, not everyone will be able to order straight away as they will still see the old page.
  10. Thread Author  Thread Author    #60  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by firstness View Post
    I wonder if this is the result of various google cloud servers receiving updates at different times. Perhaps once N4 sales go live, not everyone will be able to order straight away as they will still see the old page.
    That is exactly what I was seeing. It would be a single MD5, then another, then the first, then the second again. I finally decided to check against a list of known MD5's and the spamming issue seems to have gone away.
  11. #61  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Thanks BCVisin. i've just PM'd you my email. Is your script able to check Google Play Stores from different countries? May need a VPN connection for this.
  12. #62  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Would greatly appreciate you adding my email dude, lcrisp6@gmail.com
  13. #63  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    How did you generate the md5 hash? This may be a n00b question but I thought md5 hash's were generated from a string. Did you simply copy the url source and get it that way? Thanks!
  14. Thread Author  Thread Author    #64  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Quote Originally Posted by rshgator View Post
    How did you generate the md5 hash? This may be a n00b question but I thought md5 hash's were generated from a string. Did you simply copy the url source and get it that way? Thanks!
    So the python class method urllib.urlopen() returns a file like object of the URL page. I then assign it to a variable string by calling the read() method on that object. So yes, it is reading the entire source of the page as a string. I then use hashlib to get an MD5 of the source of that page, and compare it against a known MD5 of that page. If it changed, something in the HTML source changed. This will likely not work on pages who's source is changed dynamically by javascript, but in this case google changed the source of the pages as soon as it went on sale. I as well as the others that I sent the email to got notified as soon (within 30 seconds as I had this in a 30 second loop) as the N4 came on sale. It worked! I got mine in the first batch shipped out since I got notified less than a minute after the page changed.

    Reference:
    20.5. urllib ? Open arbitrary resources by URL — Python v2.7.3 documentation
    14.1. hashlib ? Secure hashes and message digests — Python v2.7.3 documentation

    -Blake
  15. #65  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Just added this to my crontab

    MAILTO=you@youremail.com
    */20 * * * * curl -s 'https://play.google.com/store/devices/details?id=nexus_4_16gb' | grep 'Sold out' > /dev/null || echo "NEXUS ON SALE!"
  16. #66  

    Default Re: Python script to notify you the minute the Nexus 4 page goes on sale

    Maybe it would be more efficient if your script just searched for "We are out of inventory" on the nexus pages and report when it does NOT show up any more? You'll be immune to other changes that way.
    Regard all phenomena as dreams...
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Technically isn't it incorrect to say you are hacking the GNex?
    By CarryMe in forum Verizon Galaxy Nexus Rooting, ROMs, and Hacks
    Replies: 10
    Last Post: 01-04-2012, 09:50 AM
  2. Are you able to use bluetooth while in the car dock?
    By katrina2475 in forum Motorola Droid X
    Replies: 14
    Last Post: 09-14-2010, 08:11 AM
  3. Way to kill off the EVO:( Sprint & HTC this is on you!!!
    By widdlewade in forum HTC EVO 4G Rooting, ROMs, and Hacks
    Replies: 30
    Last Post: 08-26-2010, 08:03 PM
  4. How to unroot so you can download the official froyo when it comes out
    By Murraysj09 in forum Incredible Rooting, ROMs, and Hacks
    Replies: 30
    Last Post: 07-27-2010, 10:07 PM
  5. Replies: 3
    Last Post: 01-29-2010, 05:55 PM

Posting Permissions