backlink creator

Floccer

Regular Member
Joined
Mar 2, 2019
Messages
365
Reaction score
163
Hi,

I have built python + selenium bot that would do guestbook backlinks.

i currently have few sites that works and i get data from excel sheet where i have link, anchor etc info. But to do this in bigger scale i'm having hard time figuring logic how it could be done.

I did seperate functions for every website and would like to submit 1 link/anchor to one site. How i would be able to loop site functions to accomplis this?

basicly i have for loop that will do 1 excel line at time but i might need to do another loop inside. If i place all functions in loop i just get duplicate anchor texts that i don't want. Or should this be done completely different way?
 
Its wierd how things somehow starts to work better when asking help. So i managed to do this simply using if statements. Its not pretty but works. I now get 1 row of data to one website as i wanted. Next i just need to add more sites to list and this if block will get very ugly :S


Python:
if (i == 0):
            link1(arg1, arg2, arg3) #Run link1 function
        if (i == 1):
            link2(arg1, arg2, arg3) #Run link2 function
        if (i == 2):
            link3(arg1, arg2, arg3) #Run link3 function

       
        i = i+1
        if (i == 3):
            i = 0
 
I didn't know it was possible to create python list containing functions. After i figured out how to do it i wrote my script again.

I still wonder how some programs create backlinks as i'm pretty sure those do not have site specific instuctions like i do. I just have list that i go thrue and pretty much use mostly for indexing.

Not sharing entire code but if someone wants to do similar i'm pretty sure they can do it. Getting link, anchor and email data from excel to fill comment. Sites are in seperate file not in any particular order and i just add them to list in main function. This will send 1 backlink to every website, marks it as done on excel and moves to next one. Also have list of random comments.

Python:
driver = webdriver.Chrome()

link = excelData.iloc[x, 0]
anchor = excelData.iloc[x, 1]
email = excelData.iloc[x, 2]

siteList = [sites.1(driver, link, anchor, email),
            sites.2(driver, link, anchor, email),
            sites.3(driver, link, anchor, email),
            sites.4(driver, link, anchor, email)]

for i in siteList:
    i

I could do little randomness here. As sites are always on same order it is possible to shuffle the list before starting. Also if i have 100 sites i could do random amount between 10 and 100.

I also would like to do multithreading. It seems simple but i'm little uncertain how it would work with excel as it writes there. so would it encounter problems if excel is in use on another thread? It should check if some line is on work so it wouldn't do same.
 
This starts to look like to becoming my code learning joyrney. But its nice to see improvements overtime.

So my last version was complete fail as python list containing functions will run them all and for loop under list wasn't even triggered. There was some dictionary hack that i wasn't able to get going and now i have switch function thats working nicely. I only have 24 sites now but i can loop then creating 1 backlink per website. Also had to do some failsafes as there can be many things that could fail.

Python:
def switch(selection, driver, link, anchor):
    switcher = {
        1: sites.f1,
        2: sites.f2,
        3: sites.f3,
        4: sites.f4,
    }

    func = switcher.get(selection)
    if not func(driver, link, anchor):
        return False
    else:
        return True

i = 1

if switch(i, driver, link, anchor):
    i = i + 1

All i need is link and anchor text and i can create backlinks and use these maybe as t2. Next i try to create few web 2.0 or something and send many backlinks to them and see how well those gets indexed.

I really would like to get this working on multithreaded. These sites are rather slow so making even few takes more time than i would want to spend. I did try to do requests posting but i constantly faced SSL errors and was unable to get it working. That would definitely be faster as i hoped i could just send data that i managed to get out of browser inspector to form php script .
 
awesome, can I have a share of your python ware?
I do not want to share this. But if i get this working little better maybe i could go backlink giveaway or something..
 
mmkay. So previously i was manually going through every website looking for element names and thats soooo slow. And after getting some website data i started noticing some patterns and again.. completely remade my program. As i have seen gsa and scrapebox takes just website list as input there is some logic behind program that determines where to place data. so now i have that, sort of. success rate maybe 70% but i don't need to inspect every website. I get error message on pages that i cannot process and i can check invidual sites whats those problem is.

And got multiprocessing working. I have tried to get this working many times but i think my code wasn't ready for it :)

Its now faster but i think virtual box slows it down as it seems to run only 4 browsers simultaneously. But there is reason why its on virtual machine. There is copy paste functions going on and it interferes me if i do something on pc as i might give it random text and it gives me as it shares same clipboard :)

Now i just need to add link and anchor text to multiprocessed part and get bigger website list. Still i wonder how gsa or sb does this. I'm pretty sure those do not use browser emulation and that makes those much faster.
 
Back
Top