omkarcloud / botasaurus

The All in One Framework to build Awesome Scrapers.
https://www.omkar.cloud/botasaurus/
MIT License
1.16k stars 104 forks source link

Tasks folder empty #28

Closed gameuser1982 closed 5 months ago

gameuser1982 commented 6 months ago

I am following the guide here: https://www.omkar.cloud/botasaurus/docs/sign-up-tutorial/

I pasted the following script:

from botasaurus import *

@browser(
    data = lambda: bt.generate_users(3, country=bt.Country.IN),
    block_resources=True,
    profile= lambda account: account['username'],
    tiny_profile= True,
)
def create_accounts(driver: AntiDetectDriver, account):
    name = account['name']
    email = account['email']
    password = account['password']

    def sign_up():
        driver.type('input[name="name"]', name)
        driver.type('input[type="email"]', email)
        driver.type('input[type="password"]', password)
        driver.click('button[type="submit"]')

    def confirm_email():
        link = bt.TempMail.get_email_link_and_delete_mailbox(email)
        driver.get(link)

    driver.google_get("https://www.omkar.cloud/auth/sign-up/")
    sign_up()
    confirm_email()
    bt.Profile.set_profile(account)    

@browser(
    data = lambda: bt.Profile.get_profiles(),
    block_resources=True,
    profile= lambda account: account['username'],
    tiny_profile= True,
)
def take_screenshots(driver: AntiDetectDriver, account):
    username = account['username']
    driver.get("https://www.omkar.cloud/")
    driver.save_screenshot(username)

if __name__ == "__main__":
    create_accounts()
    take_screenshots()

So the example does take 3 screenshots and saves them in output and each screenshot is saved as the username but since images are blocked, there isn't much to the screenshots.

There is a create_accounts.json and a take_screenshots.json but they only report 3 null entries. Is this normal?

Also the tasks directory is empty and doesn't contain any metadata on the bot run.

gameuser1982 commented 6 months ago

Profiles folder however is not empty and contains the 3 profiles

gameuser1982 commented 6 months ago

Also here is a sample of one of the screenshots krishnasullad1971