Giter Club home page Giter Club logo

freenom-auto-renew-domains's Introduction

Auto renew domain

Freenom Auto Renew Domains

Description

This application is a scraper built with puppeteer combined to a discord bot that list your domains, their status and how many days it left before it needs a renew. This application will also auto renew you free domains when it's possible. (auto renewal is deactivated by default for paid domains, but in a future update you'll be able to manage auto renew with discord commands)

It is highly recommended using this app under a process manager like pm2, as it become a background process that will run on your server. If you don't have a dedicated server that is always on, consider using Heroku.

Warning

Due to lack of accessible data on freenom and to avoid unwanted behavior, please be sure at the first start that there is no free domains renewable.

You can take a look here My Freenoms Domains.

If you have free domain that is renewable please renew it before starting this tool. In this way, free domain won't be considered as paid domain and set auto renew to false by default while creating database for the first time. Of course, for the next launches of the tool, you don't mind about having free domains renewable, the tool will automatically renew it if the first start was execute as described before.

Prerequisites

  • node >= 16
  • npm
  • pm2

Quickstart

npm install
make .env
pm2 start npm --name FreenomAutoRenewDomains -- run start

Env file

Before running for the first time, you need to fill your .env file with your own values.

DB_NAME=freenoms-domains
PUPPETEER_HEADLESS=true

DISCORD_BOT_TOKEN=
DISCORD_GUILD_ID=
DISCORD_CHANNEL_ID=

FREENOM_LOGIN=email
FREENOM_PASS=password
FREENOM_CRONJOB="0 9 * * 1"

# Docker exec path
CHROME_PATH=google-chrome-stable
# Linux
CHROME_PATH=/usr/local/bin/chromium
  • DB_NAME: The name of the local sqlite3 db used to saved domain data and preferences (like auto renew)
  • PUPPETEER_HEADLESS: Display the chromium browser or not
  • CHROME_PATH: The path to a chromium browser used by puppeteer
  • DISCORD_BOT_TOKEN: The discord bot token (More info on Discord.js Guide)
  • DISCORD_GUILD_ID: The discord server (see Discord Docs - How to retrieve ID)
  • DISCORD_CHANNEL_ID: The discord channel id (see Discord Docs - How to retrieve ID)
  • FREENOM_LOGIN: Your email of your Freenom account
  • FREENOM_PASS: Your password of your Freenom account
  • FREENOM_CRONJOB: The cronjob rule on you want to schedule auto renew. By default, the cronjob rule is set at 09 AM every Monday. (More info on Crontab.guru)

Examples

Listing domains with infos

Auto renewal

freenom-auto-renew-domains's People

Contributors

snyk-bot avatar sorok-dva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

freenom-auto-renew-domains's Issues

How to use with Google login on Freenom?

So I use a Google account to login to Freenom
I get this error when using a Google account

Connected to the freenoms-domains database.
Domain Checker - Freenom
Username complete
Password complete

[login] Error TimeoutError: waiting for selector `.renewalContent` failed: timeout 30000ms exceeded
    at new WaitTask (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:513:34)
    at DOMWorld.waitForSelectorInPage (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:424:26)
    at internalHandler.waitFor (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)
    at DOMWorld.waitForSelector (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:317:29)
    at Frame.waitForSelector (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)
    at Page.waitForSelector (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2313:33)
    at Object.login (/home/pi/services/freenom-auto-renew-domains/config/freenom.js:66:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.init (/home/pi/services/freenom-auto-renew-domains/config/freenom.js:47:7)
    at async CronJob.<anonymous> (/home/pi/services/freenom-auto-renew-domains/app.js:13:3)
Scrap finished for https://my.freenom.com/domains.php?a=renewals
[renew] Error Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
    at CDPSession.send (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:208:35)
    at ExecutionContext._evaluateInternal (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50)
    at ExecutionContext.evaluate (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:27)
    at DOMWorld.evaluate (/home/pi/services/freenom-auto-renew-domains/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:91:24)

I suspect that freenom-auto-renew-domains does not know how to login with Google. Or at least how I have it in my config

DB_NAME=freenoms-domains
CHROME_PATH=/usr/bin/chromium-browser
DISCORD_WEBHOOK_ID=*******************
DISCORD_WEBHOOK_TOKEN=**********************************************
[email protected]
FREENOM_PASS=my google password
FREENOM_CRONJOB="*/5 * * * *"

This is not a real issue, just a thanks

hey,
i just want to say thank you, your git is so great for me cause i have lot of domain there at freenom, and i need this, cause my head memory is nearly full because of life stuff, and the internet... that terrible.
Now i can sleep well with your git auto renewal, thankyou so much, i love youuuu

i will going to sponsor for the project

Hi,

i'm very pleasure for your hard work gained to the community all around the world, just because this is end of the month so i'm not having much to sponsor the project, but promise to sponsor more in the next month as i can.

thanks much, and love from here.

Error on start

Start tool with docker-compose by
docker-compose up -d

and get error ->
image

if remove from docker-compose.yml property
build.target = dev
get error ->
image

Error

> [email protected] start
> node .

Connected to the freenoms-domains database.
[INIT] Failed TimeoutError: Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r901912 is guaranteed to work.
    at Timeout.onTimeout (/home/container/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:208:20)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)


Got this error

error (?) in Makefile

maybe error in Makefile because need use docker-compose instead docker compose

image

fixed ->

image

Errors

Hello, it stopped working

Connected to the freenom1-domains database.
Domain Checker - Freenom
Username complete
Password complete
connected
[renew] Error Error: net::ERR_ABORTED at https://my.freenom.com/domains.php?a=renewdomain&domain=1107348492
    at navigate (/home/container/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:194:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async FrameManager.navigateFrame (/home/container/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:170:21)
    at async Frame.goto (/home/container/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:583:16)
    at async Page.goto (/home/container/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1112:16)
    at async /home/container/config/freenom.js:119:11
    at async Promise.all (index 2)
    at async Object.renewFreeDomains (/home/container/config/freenom.js:98:7)
    at async Object.init (/home/container/config/freenom.js:52:7)
    at async run (/home/container/app.js:18:3)
Scrap finished for https://my.freenom.com/domains.php?a=renewals

It doesnt want to renew anymore

not working

Well i wanted to run this app but gave me an issue on www.replit.com as it can run 24/7.
it say it can't find .env even though it is stored in secrets and could you plz tell how to use webhooks as it give only url and it requires token no.
thankyou

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.