#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    19
    Rep Power
    0

    Try to convert this with javascript or jQuery


    How would I be able to convert this code in a script via javascript or with jQuery where I would be able to monitor this or any other tweet in real time from this user and with the keyword Ex: "jordan spizike" or "3M" and then have a DOM auto click or redirect me to the Url in this code <P class=js-tweet-text sizcache023579156412676866="31 11 2" sizset="false">The Jordan Spizike ‘3M’ is now available <A dir=ltr class=twitter-timeline-link title=http://gonike.me/6015nkLh href="http://t.co/4NZ14GwLHw" target=_blank data-expanded-url="http://gonike.me/6015nkLh" jQuery183045707141658943673="593"><SPAN class=invisible>http://</SPAN><SPAN class=js-display-url>gonike.me/6015nkLh</SPAN><SPAN class=invisible></SPAN><SPAN class=tco-ellipsis><SPAN class=invisible>&nbsp;</SPAN></SPAN></A></P>
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,115
    Rep Power
    1990
    If you're going to use jQuery you can use the .post() function to retrieve data from a remote URL. From there you'd have to figure out how to search the returned data to see if the keyword is in there.

    I gather that you haven't actually tried to write anything to do this yet? If that's the case I'll say that it is possible depending on what you can get from twitter. You'll just have to do some work yourself and write something. Try that first and then let us know if something isn't working like you expect.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    19
    Rep Power
    0
    Originally Posted by Catacaustic
    If you're going to use jQuery you can use the .post() function to retrieve data from a remote URL. From there you'd have to figure out how to search the returned data to see if the keyword is in there.

    I gather that you haven't actually tried to write anything to do this yet? If that's the case I'll say that it is possible depending on what you can get from twitter. You'll just have to do some work yourself and write something. Try that first and then let us know if something isn't working like you expect.
    I don't know to put it together this is the beginner thread is it not lol??? I'm trying to learn as someone explains the process. And then if there are any tweaks to be made I can do that with my new found knowledge!
  6. #4
  7. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,115
    Rep Power
    1990
    It is the beginners thread, but it's still expected that you'll make some effort yourself.

    What I said still stands though. Have a look at the .post() function of jQuery. Start off with getting that to return the data from Twitter, them move on to trying to find the value/values that you are looking for in that data, then work on performing the actions that you want when you do find that data. You will probably have to register to access the Twitter API if you want to do things the "easy" way, or if you feel like parsing a whole bunch of HTML you can scrape the pages content and iterate through it to find what you are looking for.

    How that's all done will really depend on exactly what you're getting back from your Twitter feed. The code that you've given below is only HTML code that doesn't tell us anything about what data is available. That's why you'll have to do some work yourself. The first step is to find out what data you actually need, and then find out exactly how it's available to you. From there you can figure out what you need to do for the rest.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    19
    Rep Power
    0
    Originally Posted by Catacaustic
    It is the beginners thread, but it's still expected that you'll make some effort yourself.

    What I said still stands though. Have a look at the .post() function of jQuery. Start off with getting that to return the data from Twitter, them move on to trying to find the value/values that you are looking for in that data, then work on performing the actions that you want when you do find that data. You will probably have to register to access the Twitter API if you want to do things the "easy" way, or if you feel like parsing a whole bunch of HTML you can scrape the pages content and iterate through it to find what you are looking for.

    How that's all done will really depend on exactly what you're getting back from your Twitter feed. The code that you've given below is only HTML code that doesn't tell us anything about what data is available. That's why you'll have to do some work yourself. The first step is to find out what data you actually need, and then find out exactly how it's available to you. From there you can figure out what you need to do for the rest.
    Well to explain it again. I'm trying get the script being as a monitor for this users twitter feed for real time tweets. And when the user tweets new real time tweets such as this Ex: The Nike Basketball Kobe 8 System+ ‘Supernatural’ is now available http://gonike.me/6014nkLC the script will then see the new tweet and auto click the link bringing me to clicked url page. But I need the script to be able for me to input key words like "kobe supernatural available now"in script. Available from the text area of tweet then trigger the function to navigate to the desired url.
  10. #6
  11. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,115
    Rep Power
    1990
    I get what you're trying to do. I really do. What I'm telling you is that no one here is going to write the code for you. You need to actually make an effort yourself. I've told you what you need to do, what you need to investigate and given you an idea of a bit of process flow on how to get going. Now it's time for you to go and do some work for yourself.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    19
    Rep Power
    0
    Originally Posted by Catacaustic
    I get what you're trying to do. I really do. What I'm telling you is that no one here is going to write the code for you. You need to actually make an effort yourself. I've told you what you need to do, what you need to investigate and given you an idea of a bit of process flow on how to get going. Now it's time for you to go and do some work for yourself.
    I have been reading and reading and reading!!! And I can somewhat read a script but I have no idea on how to write it. Or Where to start it just seems like so much more then what I would write in a script. it sort of like picking up a second language you may be able to pick up a book and read it. But if you try to talk or be fluid with it so soon you may be stuck looking like a idiot! And I read on the .post what you told me to do and I'm still looking at this like Ok I see what it does. But it really doesn't help me on how to write it.
  14. #8
  15. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,115
    Rep Power
    1990
    Then what you need to do is start off with something a lot smaller, and work your way up. No one picks up programming (not the right way anyway) overnight. Start off with a few small examples, get them to work, and try to really understand what they are doing and how they are doing it. When you're comfortable with that move onto something a little more ambitious, and do the same. If you keep doing that you'll find that you'll be getting better and better and you'll soon be at a point where you can look at this problem and see an actual answer for yourself, or at least the starting point and building blocks that you might need to do it.

    However if that's to much, you might consider hiring someone to do it for you.

IMN logo majestic logo threadwatch logo seochat tools logo