Unconfigured Ad Widget

Collapse

UPDATE: Source Code and Application to Monitor Marketplace Threads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msternin
    CGN/CGSSA Contributor
    CGN Contributor
    • Jan 2015
    • 881

    UPDATE: Source Code and Application to Monitor Marketplace Threads

    Was thinking about writing some custom software to monitor the marketplace and alert me when a thread, given a specific criteria, comes up.

    Ie: monitor "private Firearms Sales - Handguns" and look for G42's.
    Something like that - I'm sure you get the idea.

    Rather than reinvent the wheel, I figured I'd ask here first. I've done projects like this before and if no specific APIs were available, I'd just retool some old code.


    Application is basically done. See additional posts below to link to both source code (Visual Studio 2012) and a complied "release" build for those CGNers who just want to run the application.

    Have fun!!
    Last edited by msternin; 03-27-2015, 2:44 PM. Reason: Updates & Changes
  • #2
    Exile Machine
    No longer in Business
    CGN Contributor - Lifetime
    • Oct 2009
    • 9551

    Have you looked into using google alerts?
    -Mark
    Manufacturer of CA AWB Compliance Products from Oct 2009 to Nov 2018

    Comment

    • #3
      msternin
      CGN/CGSSA Contributor
      CGN Contributor
      • Jan 2015
      • 881

      Originally posted by Exile Machine
      Have you looked into using google alerts?
      -Mark
      Too juvenile for me. I want to build something rather specific to task.

      Comment

      • #4
        msternin
        CGN/CGSSA Contributor
        CGN Contributor
        • Jan 2015
        • 881

        Furthermore, I want to build deeper analysis as so I would inspect the content of the thread and look for additional key parameters.

        Comment

        • #5
          ocabj
          Calguns Addict
          • Oct 2005
          • 7924



          I haven't used (admin'ed) vBulletin in years so I can't comment on the API that exists now. But it appears to be a REST API. Data received in json.

          Distinguished Rifleman #1924
          NRA Certified Instructor (Rifle and Metallic Cartridge Reloading) and RSO
          NRL22 Match Director at WEGC

          https://www.ocabj.net

          Comment

          • #6
            msternin
            CGN/CGSSA Contributor
            CGN Contributor
            • Jan 2015
            • 881

            Cool. I'll check out the docs.

            Comment

            • #7
              msternin
              CGN/CGSSA Contributor
              CGN Contributor
              • Jan 2015
              • 881

              UPDATE: Version 1 - Pretty Much Done

              Spent a little over an hour to come up with a good working 1st version. (See attached Screen Shot)

              Based on a set of keywords, the app will (acting like a web user) grabs all interesting links from a given marketplace page(s). It lists them onscreen and allows me to double-click to open in a browser. The process repeats based on a specified interval.

              The links are tracked by their thread Id so I don't get dups in the list.

              It essentially removes a ton of work for me looking for specific items that I'm interested in.
              Attached Files

              Comment

              • #8
                lasbrg
                Veteran Member
                • Nov 2012
                • 4240

                Originally posted by msternin
                Spent a little over an hour to come up with a good working 1st version. (See attached Screen Shot)

                Based on a set of keywords, the app will (acting like a web user) grabs all interesting links from a given marketplace page(s). It lists them onscreen and allows me to double-click to open in a browser. The process repeats based on a specified interval.

                The links are tracked by their thread Id so I don't get dups in the list.

                It essentially removes a ton of work for me looking for specific items that I'm interested in.
                Looks interesting, would you be willing to share the code?

                Comment

                • #9
                  Jeepers
                  Veteran Member
                  • Sep 2009
                  • 3415

                  Originally posted by lasbrg
                  Looks interesting, would you be willing to share the code?


                  maybe even donate it to the site and all could use it seeing that VB's search engine blows most of the time
                  Originally posted by Ronald Reagan
                  Before I refuse to take your questions, I have an opening statement.

                  Comment

                  • #10
                    msternin
                    CGN/CGSSA Contributor
                    CGN Contributor
                    • Jan 2015
                    • 881

                    I have no issues sharing what I've built with the community. That said, I need to work out a few rough edges with what I've done so far in so much as to make it a little less "me" specific for others.

                    For example, right now the "keywords" are hard coded with no means to add/change/delete from the UI. Naturally they are hard coded for my current desires of finding 1st, 2nd and 3rd gen S&W semi-autos.

                    The tool/applet (whatever you want to call it) would not take the place of any existing search tool as it only performs a very surface-layer analysis without actually doing any deeper dives into an actual thread itself. Right now, I have no need for that.

                    Give me a little more time (maybe by the end of the week) to de-personalize it and I can then create a repo on Bitbucket. I just don't want to get bombarded with feature requests or even bug fixes. (Yes I admit, I may have written a line or two of code in my day that had a bug in it. - I actually prefer to say "undocumented feature")

                    If you all are good with that than I'll de-personalize and move forward from there.

                    Comment

                    • #11
                      lasbrg
                      Veteran Member
                      • Nov 2012
                      • 4240

                      Outstanding msternin, thank you very much!

                      Comment

                      • #12
                        xOperator
                        Member
                        • Jan 2013
                        • 242

                        Wouldnt it be easier just to add RSS Feeds?
                        // ΜΟΛΩΝ ΛΑΒΕ //

                        Comment

                        • #13
                          msternin
                          CGN/CGSSA Contributor
                          CGN Contributor
                          • Jan 2015
                          • 881

                          Originally posted by xOperator
                          Wouldnt it be easier just to add RSS Feeds?
                          no. rss does not do what I want.

                          Comment

                          • #14
                            msternin
                            CGN/CGSSA Contributor
                            CGN Contributor
                            • Jan 2015
                            • 881

                            UPDATE: A few feature and UI changes

                            Made a few changes to some features and the UI.

                            From the newly attached screen shot, you can see that keywords can now be modified as opposed to previously being hard coded to serve only my needs.

                            If fact, when you exit the app, it will save off your listed keywords and reload them the next time you fire up the app.

                            You'll also notice a check-box to run as an anonymous user or you can grab your "bbuserid" & "bbpassword" values from you web browser's cookie files.

                            The logic of the app works the same, but vBulletin returns different style URLs for anonymous users which includes some kind of session variable not present when run with your bbuserid & bbpassword. (If you don't know how to find your web browser cookies, leave Anonymous checked as this is the default) - It's a geeky thing.

                            Lastly, you can see from the screenshot, I added a status strip at the bottom to display some info.

                            To view the "interesting" post, you can either double-click it in the list or use the arrow keys and hit "enter"

                            Tomorrow I'll add some threading code since right now everything is done within the context of the main UI thread, so when the Web call is done to fetch the links, the UI can hang for a second or two. The threading code will allow UI updates to be made in a thread-safe way and not hang the UI.

                            So far on track to post the code by the end of the week, maybe even earlier.
                            Attached Files

                            Comment

                            • #15
                              rdfact
                              CGN Contributor
                              • Nov 2012
                              • 2574

                              What language is your app written in?

                              Comment

                              Working...
                              UA-8071174-1