Sinisterly
[ALPHA] API for CodeCommunity [WIP] - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [ALPHA] API for CodeCommunity [WIP] (/Thread-ALPHA-API-for-CodeCommunity-WIP)

Pages: 1 2 3 4 5 6 7


RE: [VB] API for CodeCommunity [WIP] - Platinum - 07-23-2013

(07-23-2013, 06:34 PM)shebang Wrote: If you're looking to get the usertitle still (says so in your focus), here's a solution.

Code:
Dim x As String = New IO.StreamReader(Net.WebRequest.Create("http://www.codecommunity.net/member.php?action=profile&uid=" & UID).GetResponse.GetResponseStream).ReadToEnd Return Split(Split(x, "<!-- start: member_profile_groupimage -->")(1).Split(">")(0), "alt=""")(1).Split("""")(0)

Just FYI, Split() is twice as fast as RegEx (if that's what you are using).

I would never use Regex to get the usertitle, thanks a bunch!


RE: [VB] API for CodeCommunity [WIP] - Platinum - 07-25-2013

Quote:update 2:

Recoded getting the avatar, now works for ANY link. all there's left to make a check if the user has an avatar or not
  • Added the ability to log in via a form, no webbrowsers needed (thanks to Sap for cleaning up!)
  • Added the ability to get the custom usertitle (code thanks to shebang!)

Next up in the list is to get forum-names/sections and to get the usergroup images (need some help)

Also added an image for you to see the logging in! There's a webbrowser in there, but has nothing to do with the log-in script.

CURRENT FOCUS: Getting the custom user title. Get forum-names/sections and usergroup images/names.

You can log in with your account!
Spoiler:
[Image: F3ZvH3k.png]
It's done without any webbrowser!



Updated the list:

  • Logging in with custom script

  • Get the usergroup names/images



RE: [VB] API for CodeCommunity [WIP] - Xanii - 07-25-2013

I might make a PHP clone of this that could be implemented into any language with a web request if people want to use this with other languages.


RE: [VB] API for CodeCommunity [WIP] - Shebang - 07-25-2013

I know I've already said that RegEx is slow, but you could probably use this if you needed to as the matches Did it with Split():

Main Forums:
Code:
For Whatever Split(Split(source, "<div><strong><a href=""forumdisplay.php?fid=")(x).Split("<")(0), """>")(1) Next

Main Subforums:
Code:
For Whatever Split(Split(source, "<strong><a href=""forumdisplay.php?fid=")(x).Split("<")(0), """>")(1) Next

Other Subforums:
Code:
For Whatever Split(source, "title="""">")(x).Split("<")(0) Next



RE: [VB] API for CodeCommunity [WIP] - Hexology - 07-26-2013

(07-23-2013, 05:52 PM)Eternity Wrote: Why are you working on the easy bit ?
Go over to thread lookup and posting via VB Wink

Good work though, Webrequest/RegEx ?

This is literally the biggest face palm I've ever had on this forums (so far).

"Why are you working on the easy bit"

????

What kind of API would it be if it couldn't do any of those features? Those are by far the most important ones. Doesn't matter if it's easy or hard its what has to be done. Damn.


RE: [VB] API for CodeCommunity [WIP] - Eternity - 07-26-2013

You want a piece of me ?! C'mon let's fight!

Nha just kidding.

I was implying that those features was the easy bit and the thread lookup will be a pain in the ass.
Important or not, I'am right i guess.


RE: [VB] API for CodeCommunity [WIP] - Hexology - 07-26-2013

(07-26-2013, 05:47 AM)Eternity Wrote: You want a piece of me ?! C'mon let's fight!

Nha just kidding.

I was implying that those features was the easy bit and the thread lookup will be a pain in the ass.
Important or not, I'am right i guess.

Okay, well your original comment wasn't needed, more like a post booster.

That's like saying "Why'd you put a textbox there? so easy." When you have to have the textbox to complete the application.

Don't see how you're "Right"? Nothing to win in here was just saying that was the biggest face palm I've seen yet, and it still stands.


RE: [VB] API for CodeCommunity [WIP] - Eternity - 07-26-2013

(07-26-2013, 05:51 AM)Hexology Wrote:
(07-26-2013, 05:47 AM)Eternity Wrote: You want a piece of me ?! C'mon let's fight!

Nha just kidding.

I was implying that those features was the easy bit and the thread lookup will be a pain in the ass.
Important or not, I'am right i guess.

Okay, well your original comment wasn't needed, more like a post booster.

That's like saying "Why'd you put a textbox there? so easy." When you have to have the textbox to complete the application.

Don't see how you're "Right"? Nothing to win in here was just saying that was the biggest face palm I've seen yet, and it still stands.

"Go over to thread lookup and posting via VB :Wink:" Holy shit you're right, i did say that o.O
Lol sorry.


RE: [VB] API for CodeCommunity [WIP] - Platinum - 07-26-2013

Guys no need for arguing please!!

(07-25-2013, 08:19 PM)shebang Wrote: I know I've already said that RegEx is slow, but you could probably use this if you needed to as the matches Did it with Split():

Main Forums:
Code:
For Whatever Split(Split(source, "<div><strong><a href=""forumdisplay.php?fid=")(x).Split("<")(0), """>")(1) Next

Main Subforums:
Code:
For Whatever Split(Split(source, "<strong><a href=""forumdisplay.php?fid=")(x).Split("<")(0), """>")(1) Next

Other Subforums:
Code:
For Whatever Split(source, "title="""">")(x).Split("<")(0) Next

Thanks you for these codes, I might use them :O Learn me the splitting, I don't understand it at all ;$


RE: [VB] API for CodeCommunity [WIP] - Shebang - 07-27-2013

(07-26-2013, 10:11 AM)Platinum Wrote: Guys no need for arguing please!!

(07-25-2013, 08:19 PM)shebang Wrote: I know I've already said that RegEx is slow, but you could probably use this if you needed to as the matches Did it with Split():

Main Forums:
Code:
For Whatever Split(Split(source, "<div><strong><a href=""forumdisplay.php?fid=")(x).Split("<")(0), """>")(1) Next

Main Subforums:
Code:
For Whatever Split(Split(source, "<strong><a href=""forumdisplay.php?fid=")(x).Split("<")(0), """>")(1) Next

Other Subforums:
Code:
For Whatever Split(source, "title="""">")(x).Split("<")(0) Next

Thanks you for these codes, I might use them :O Learn me the splitting, I don't understand it at all ;$

I might do a little explanation so people can understand it.