Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

(TuT)Youtube login with multiple accounts using youtube api(TuT)

Imports:
Code
Imports Google.GData.Client
Imports Google.GData.Extensions
Imports Google.GData.YouTube
Imports Google.GData.YouTube.YouTubeService
Imports Google.GData.Extensions.MediaRss
Imports Google.YouTube
Imports System.Management
Imports System.Net
Imports System.IO
Imports System.Text
Imports Microsoft.VisualBasic.CompilerServices
Imports System.Threading
Imports System.Text.RegularExpressions
Imports Google.GData.YouTube.SubscriptionEntry

Importing Accounts:
Code
Dim accounts as string
Sub importaccounts
Dim ofd as new openfiledialog - OFD is now open file dialog
accounts = ofd.filename - It will put all the text in the .txt file into the string accounts
If accounts <> "" then - If the transfer was successful
Messagebox.show("Accounts imported successfully")
End if
End sub

Logging in:
Code
Sub login()
       Dim splitz as string
        Dim arrayz As String() = File.ReadAllLines(accounts)
        For Each splitz In arrayz


            Dim settings As YouTubeRequestSettings = New YouTubeRequestSettings("BOTNAME", "APIKEY", Conversions.ToString(user(splitz)), Conversions.ToString(pass(splitz)))
            Dim request As YouTubeRequest = New YouTubeRequest(settings)
        Next

    End Sub

Splitting Functions:
Code
Public function user(byval thing as string)
return thing.substring(0, thing.indexof(":"))
End Function

Public function pass(byval thing as string)
return thing.substring((thing.indexof(":") + 1), ((thing.length - thing.indexof(":") - 1))

You will need to import the accounts from a text file with the following format:

Account:Password

You can change it accordingly to the splitting functions
Very nice dude, This is the first Tutorial/Guide I've seen by somebody with the ability to work with API's.

Nice one buddy.
Thank you man, appreciate the nice comment ;D
I get 7 import errors like this:

Warning 7 Namespace or type specified in the Imports 'Google.GData.YouTube.SubscriptionEntry' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\****\****\AppData\Local\Temporary Projects\YTB\Form1.vb 14 9 *
Need any C++/Java/Python programming homework done? PM me and we'll negotiate a price.
did you added References i guess you didnt... there are references:
http://www.mediafire.com/?si1qh1h86qa8uub

I hope you know how to import it to a project :)
You could of saved a lot of time by doing this.
PHP Code

<?php 
Dim str
() As String = Split(ListBox1.SelectedItem.ToString(), ":")

Sub login()
     
Dim settings As YouTubeRequestSettings = New YouTubeRequestSettings("BOTNAME", "APIKEY", str(0), str(1))
    
Dim request As YouTubeRequest = New YouTubeRequest(settings)
    
End Sub 
Code
Dim accounts as string
Sub importaccounts
Dim ofd as new openfiledialog - OFD is now open file dialog
accounts = ofd.filename - It will put all the text in the .txt file into the string accounts
If accounts <> "" then - If the transfer was successful
Messagebox.show("Accounts imported successfully")
End if
End sub
You didn't even show the openfiledialog...? and I assume that you should actually read the contents of the .txt file, you only got the path :P
(Aug 21, 2011 09:41 AM)Zincco Wrote:  
Code
Dim accounts as string
Sub importaccounts
Dim ofd as new openfiledialog - OFD is now open file dialog
accounts = ofd.filename - It will put all the text in the .txt file into the string accounts
If accounts <> "" then - If the transfer was successful
Messagebox.show("Accounts imported successfully")
End if
End sub
You didn't even show the openfiledialog...? and I assume that you should actually read the contents of the .txt file, you only got the path :P
My bad, i wrote it while making the thread.
You should know how to do it.
ofd.showdialog
And thats why accounts = ofd.filename is there =]

@Dim str() As String = Split(ListBox1.SelectedItem.ToString(), ":")
That won't even work, first of all you're not selecting from a listbox, secondly, if that were to be the scenario it would only grab the username.

If you guys are complaining for such easy fixes please don't use this.
Captcha handling? o_O If the account is valid but needs a captcha code....?
Invalid or Deleted File.

The key you provided for file download was invalid. This is usually caused because the file is no longer stored on Mediafire. This occurs when the file is removed by the originating user or Mediafire.
If you believe you have reached this page in error, please contact
And what if account is wrong ? i think application will show framework error lol...
Nice released dude.
Fer real.
If I did youtube, I would use this, but sadly I don't.
Sorry man. But thanks for it anyway.

-- Positive --
THank you very much bro !!!
You're so HQ and nice, best member <3
thanks you so much :D
if something worng i will ask you... :)
wow thank you I think you should make a programm for it I meen you got the skrip .... why not ?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by john ronaldsadJul 20, 2022 06:49 PM 4 238 Jul 20, 2022 06:49 PM
Last Post: john ronaldsad
[C] by Tr0jandogSep 19, 2019 10:47 AM 8 314 Sep 19, 2019 10:47 AM
Last Post: Tr0jandog
[Java] by GlushkoJun 13, 2018 11:13 PM 3 642 Jun 13, 2018 11:13 PM
Last Post: hostov