Unconfigured Ad Widget

Collapse

UPDATE: Source Code and Application to Monitor Marketplace Threads

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

    Written in C#

    Comment

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

      UPDATE: Source code & Release "App Only" Posted

      I decided not to use my Bitbucket account only because I didn't want to create a repo and then have to give rights, etc... and manage it and do all that source control stuff again.

      Also, I haven't really done anything more in the last couple days so I did not any threading code. Maybe v1.5 :-)

      Anyway, here's a link to the Visual Studio 2012 solution on Dropbox. I'll post another link that will have a "Release" build with just binaries for those only interested in running the application and who couldn't care less about the code.

      If you like it, great, if not, great! Advertise it away, make no difference to me.

      Download Solution/Source Code

      Compiled Release Build Only:
      Download the app ONLY here


      PS - Going to change the name of the thread.

      Comment

      • #18
        ocabj
        Calguns Addict
        • Oct 2005
        • 7924

        You don't use Github?

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

        https://www.ocabj.net

        Comment

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

          Originally posted by ocabj
          You don't use Github?
          I've used github before, but have no repos there, bitbucket only. That said, I haven't written a line of code in 2 years. I did this little project for fun.

          Comment

          • #20
            lasbrg
            Veteran Member
            • Nov 2012
            • 4240

            First tests with the pre-compiled version.

            - The application works as described, a huge improvement over native VBulletin search. Specify a Marketplace forum, add key words, receive a clickable list of threads and then connecting back to Calguns all worked perfectly.

            - The authentication did not work for me using Firefox, although this did not affect the functionality in any way. If I was not previously logged in, the queries were anonymous even when I entered my username and pssword in the application. If I was logged in to Calguns already, checking the "Anonymous" box did not log me out. Again, this did not affect functionality.

            Now I need to install Visual C++ and try creating some mods. Thanks again OP!

            Comment

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

              Originally posted by lasbrg
              First tests with the pre-compiled version.

              - The application works as described, a huge improvement over native VBulletin search. Specify a Marketplace forum, add key words, receive a clickable list of threads and then connecting back to Calguns all worked perfectly.

              - The authentication did not work for me using Firefox, although this did not affect the functionality in any way. If I was not previously logged in, the queries were anonymous even when I entered my username and pssword in the application. If I was logged in to Calguns already, checking the "Anonymous" box did not log me out. Again, this did not affect functionality.

              Now I need to install Visual C++ and try creating some mods. Thanks again OP!
              You have copy the cookie values from your browser, not use your actual userid/password. It's a bit confusing.

              Comment

              • #22
                lasbrg
                Veteran Member
                • Nov 2012
                • 4240

                Originally posted by msternin
                You have copy the cookie values from your browser, not use your actual userid/password. It's a bit confusing.
                Oh ok. That sounds more secure anyway.

                I have my own use case in mind for your code. I don't want to promise anything, since it's been a long time since I've down any Windows programming, but you have already done the heavy lifting.

                Comment

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

                  Using the Authentication feature

                  While it wont change the functionality, to use the Authentication feature you will need to grab same values from your browsers cookie file(s).

                  I use Chrome. Attached is a screen shot showing the cookie and value pairs you'll need. You will only need the "value" of each cookie.

                  Hope this makes sense. A future version may find the Authentication component removed, since I only used for debugging purposes, and decided to leave it in.
                  Attached Files

                  Comment

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

                    Originally posted by lasbrg
                    Oh ok. That sounds more secure anyway.

                    I have my own use case in mind for your code. I don't want to promise anything, since it's been a long time since I've down any Windows programming, but you have already done the heavy lifting.
                    Feel free to add your "stuff". If the concept of this app takes off, I will create a proper repo and will establish source control for those of us who actively want to contrib. Just like any thread, forum or other software product, if it got to that point, code would be reviewed and features would be assessed. But I think we're plenty far away from that right now.

                    Enjoy it. So far my little self-serving app has helped me get the jump on a few choice items. :-)

                    Comment

                    • #25
                      lasbrg
                      Veteran Member
                      • Nov 2012
                      • 4240

                      Originally posted by msternin
                      While it wont change the functionality, to use the Authentication feature you will need to grab same values from your browsers cookie file(s).

                      I use Chrome. Attached is a screen shot showing the cookie and value pairs you'll need. You will only need the "value" of each cookie.

                      Hope this makes sense. A future version may find the Authentication component removed, since I only used for debugging purposes, and decided to leave it in.
                      Ok, I have this in the free Visual Studio 2103 (Web Edition, Update 4) was able to easily add other forums by adding the forum number/name key pair:

                      internal Dictionary<int, string> market = new Dictionary<int, string> { { 332, "Private Firearms Sales - Handguns" }, { 92, "Private Firearms Sales - Long Guns" }, { 93, "Private Firearm Parts & Accessories Sales" }, { 169, "Private Ammo Sales" }, { 73, "OT" }, { 71, "CA 2A" } };
                      Once I did this, I found that I could search CA 2A, but not OT without the cookie value trick above. For anyone else trying this, you need to have first selected "remember me" when you logged in to generate these cookies.

                      Apart from these changes, I have just been playing around with the app to see how it behaves and not rewriting anything. I noticed that the search behavior in off topic seems to be different than the others. In OT I only seem to be able to search the thread titles, whereas in CA 2A and the Marketplace, the key words could be found in the thread bodies. I will read through the code now and to see how it works. The comments are helpful.

                      Comment

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

                        Originally posted by lasbrg
                        Ok, I have this in the free Visual Studio 2103 (Web Edition, Update 4) was able to easily add other forums by adding the forum number/name key pair:



                        Once I did this, I found that I could search CA 2A, but not OT without the cookie value trick above. For anyone else trying this, you need to have first selected "remember me" when you logged in to generate these cookies.

                        Apart from these changes, I have just been playing around with the app to see how it behaves and not rewriting anything. I noticed that the search behavior in off topic seems to be different than the others. In OT I only seem to be able to search the thread titles, whereas in CA 2A and the Marketplace, the key words could be found in the thread bodies. I will read through the code now and to see how it works. The comments are helpful.
                        The application was never intended to search anything more than thread titles nor intended to replace conventional search, and for my selfish purpose, beyond 4 aspects of the marketplace. I stated this from the beginning.

                        Yes adding more dictionary pairs would allow you or other to search more threads. I ONLY cared about what I baked in. You or others may care about more.

                        The native VB app has direct access to the sql data store, so it's easy for developers to write custom sql queries to search all content. Much more efficient than performing recursive HTTP requests.

                        This app makes a SIMPLE web request and parses the HTML returned. You are certainly more than welcome to write a sub-routine that searches the body of each "interesting" thread for a deeper analysis.

                        For me this was unnecessary as I ONLY wanted to look for certain items for sale and act quickly with the "I'll take it!!" post to lock things in my favor.

                        Glad you find the internal code comments useful.

                        Comment

                        • #27
                          lasbrg
                          Veteran Member
                          • Nov 2012
                          • 4240

                          Originally posted by msternin
                          The application was never intended to search anything more than thread titles nor intended to replace conventional search, and for my selfish purpose, beyond 4 aspects of the marketplace. I stated this from the beginning.

                          Yes adding more dictionary pairs would allow you or other to search more threads. I ONLY cared about what I baked in. You or others may care about more.

                          The native VB app has direct access to the sql data store, so it's easy for developers to write custom sql queries to search all content. Much more efficient than performing recursive HTTP requests.

                          This app makes a SIMPLE web request and parses the HTML returned. You are certainly more than welcome to write a sub-routine that searches the body of each "interesting" thread for a deeper analysis.

                          For me this was unnecessary as I ONLY wanted to look for certain items for sale and act quickly with the "I'll take it!!" post to lock things in my favor.

                          Glad you find the internal code comments useful.
                          I see now my earlier mistake. I thought I was pulling up threads by words in the post, but it looks now like I had failed to clear the results window and was seeing threads from a previous search.

                          Again, I VERY grateful for you making this code available.

                          Comment

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

                            Originally posted by lasbrg
                            I see now my earlier mistake. I thought I was pulling up threads by words in the post, but it looks now like I had failed to clear the results window and was seeing threads from a previous search.

                            Again, I VERY grateful for you making this code available.
                            Glad you are finding it useful. :-)

                            Comment

                            • #29
                              Jeepers
                              Veteran Member
                              • Sep 2009
                              • 3415

                              like it Thank You for sharing
                              Originally posted by Ronald Reagan
                              Before I refuse to take your questions, I have an opening statement.

                              Comment

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

                                Originally posted by Jeepers
                                like it Thank You for sharing

                                You are welcome. Glad you like it.

                                Comment

                                Working...
                                UA-8071174-1