[18/6 19:25] Yakup: https://chatgpt.com/s/m_68...
[9/8 07:15] Yakup: turansearch/
├── app.py
├── turansearch.db
├── templates/
│ ├── index.html
│ └── results.html
└── static/
├── logo.png
├── flag_tr.png
├── flag_az.png
└── styles.css
[9/8 07:15] Yakup: from flask import Flask, render_template, request
import sqlite3
import requests
from bs4 import BeautifulSoup
app = Flask(__name__)
DB_NAME = "turansearch.db"
# Veritabanı hazırlama
def init_db():
conn = sqlite3.connect(DB_NAME)
c = conn.cursor()
c.execute('''
CREATE TABLE IF NOT EXISTS pages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
****** le TEXT,
content TEXT,
url TEXT UNIQUE
)
''')
conn.commit()
conn.close()
# Sayfa çekme fonksiyonu
def fetch_page(url):
try:
response = requests.get(url, timeout=10)
soup = BeautifulSoup(response.text, 'html.parser')
****** le = soup.title.string if soup.title else "B
[9/8 07:15] Yakup: turansearch/
├── app.py
├── turansearch.db
├── templates/
│ ├── index.html
│ └── results.html
└── static/
├── logo.png
├── flag_tr.png
├── flag_az.png
└── styles.css
[9/8 07:15] Yakup: from flask import Flask, render_template, request
import sqlite3
import requests
from bs4 import BeautifulSoup
app = Flask(__name__)
DB_NAME = "turansearch.db"
# Veritabanı hazırlama
def init_db():
conn = sqlite3.connect(DB_NAME)
c = conn.cursor()
c.execute('''
CREATE TABLE IF NOT EXISTS pages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
****** le TEXT,
content TEXT,
url TEXT UNIQUE
)
''')
conn.commit()
conn.close()
# Sayfa çekme fonksiyonu
def fetch_page(url):
try:
response = requests.get(url, timeout=10)
soup = BeautifulSoup(response.text, 'html.parser')
****** le = soup.title.string if soup.title else "B
ChatGPT - Turan Search: Türk Cumhuriyetlerine Özel
ChatGPT helps you get answers, find inspiration and be more productive. It is free to use and easy to try. Just ask and ChatGPT can help with writing, learning, brainstorming and more.
https://chatgpt.com/s/m_6852e87a155c8191870c874a55c26437
1 yıl önce