diff options
Diffstat (limited to 'backlinkchecker.py')
-rw-r--r-- | backlinkchecker.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/backlinkchecker.py b/backlinkchecker.py new file mode 100644 index 0000000..45076b0 --- /dev/null +++ b/backlinkchecker.py @@ -0,0 +1,22 @@ +import requests +from bs4 import BeautifulSoup + +DOMAIN = "example.com" +query = f"link:{DOMAIN}" +url = f"https://www.google.com/search?q={query}" + +# Proxy setup (Replace with a working proxy) +proxies = { + "http": "http://your_proxy:port", + "https": "https://your_proxy:port" +} + +headers = {"User-Agent": "Mozilla/5.0"} + +response = requests.get(url, headers=headers, proxies=proxies) +soup = BeautifulSoup(response.text, "html.parser") + +for link in soup.find_all("a"): + href = link.get("href") + if "http" in href: + print(href) |