test second dns
This commit is contained in:
6
main.py
6
main.py
@@ -3,9 +3,7 @@ import time
|
|||||||
import requests
|
import requests
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
from requests_doh import DNSOverHTTPSSession, add_dns_provider
|
from dns_client.adapters.requests import DNSClientSession
|
||||||
|
|
||||||
add_dns_provider("shecan", "https://free.shecan.ir/dns-query")
|
|
||||||
|
|
||||||
token = os.getenv("EITAAYAR_TOKEN")
|
token = os.getenv("EITAAYAR_TOKEN")
|
||||||
chat_id = os.getenv("CHAT_ID")
|
chat_id = os.getenv("CHAT_ID")
|
||||||
@@ -25,7 +23,7 @@ def send_message(text: str) -> dict:
|
|||||||
|
|
||||||
def get_blockout_page() -> str:
|
def get_blockout_page() -> str:
|
||||||
blockout_link = 'https://qepd.co.ir/fa-IR/DouranPortal/6423'
|
blockout_link = 'https://qepd.co.ir/fa-IR/DouranPortal/6423'
|
||||||
session = DNSOverHTTPSSession("shecan")
|
session = DNSClientSession('178.22.122.100')
|
||||||
return session.get(blockout_link).text
|
return session.get(blockout_link).text
|
||||||
# return requests.get(blockout_link).text
|
# return requests.get(blockout_link).text
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user