NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

import os

# Ana dizin
base_output_directory = r'C:UsersabdiyOneDriveMasaüstüYeni klasör'

# Alt klasörler
normal_folder = os.path.join(base_output_directory, 'normal_sayilar')
processed_folder = os.path.join(base_output_directory, 'islenmis_sayilar')
html_folder = os.path.join(base_output_directory, 'html_dosyalar')
js_folder = os.path.join(base_output_directory, 'js_dosyalar')

# Klasörleri oluştur
os.makedirs(normal_folder, exist_ok=True)
os.makedirs(processed_folder, exist_ok=True)
os.makedirs(html_folder, exist_ok=True)
os.makedirs(js_folder, exist_ok=True)

# Başlangıç ve bitiş değerleri
start_number = 9000000
end_number = 8000000
step = 10000

# Dosya numarası için sayaç
file_counter = 1

# Template HTML code
template_html = """
<div class="userItem">
<a href="/zhoesneaker">
<div class="app-center-vertical userImage" style="background-image:url(https://images.gardrops.com/uploads/11887191/avatar_photo/11887191-avatar-mid.jpg);"></div>
<div class="details">
<div class="username">Ahmed</div>
<div class="productCount">paylaşım: 999</div>
</div>
</a>
<div class="followButton app-center-vertical" data-uid="{uid}" data-status="true">
<div class="app-inner-h">
<div class="app-inner-v" style="height:32px;">
<div class="plus app-center-vertical" style="display:none;">+</div>
<div class="text app-center-vertical">Takibi Bırak</div>
</div>
</div>
</div>
</div>
"""

# JavaScript template code
js_template = """
// Tüm userId'leri bir diziye ekleyin
const userIds = [
{user_ids}
];

// followUser fonksiyonunu tanımlayın
function followUser(userId) {
// Takip et butonunu bul
const followButton = document.querySelector(`.followButton[data-uid="${userId}"]`);

if (followButton) {
try {
// Takip durumunu kontrol et, eğer takip edilmiyorsa tıkla
const followStatus = followButton.getAttribute('data-status');
if (followStatus === "true") {
followButton.click();
console.log(`Kullanıcı (${userId}) başarıyla takip edildi.`);
} else {
console.log(`Kullanıcı (${userId}) zaten takip ediliyor.`);
}
} catch (error) {
console.error(`Takip etme işlemi sırasında hata oluştu: ${error}`);
}
} else {
console.error(`Kullanıcı (${userId}) için takip butonu bulunamadı.`);
}
}

// Tüm kullanıcıları takip etmek için döngü kullanın
userIds.forEach(userId => followUser(userId));
"""

# Döngü ile dosyaları oluştur
for i in range(start_number, end_number, -step):
try:
# Normal dosyayı yaz
normal_filename = os.path.join(normal_folder, f'numbers_{file_counter}.txt')
with open(normal_filename, 'w') as file:
for number in range(i, i - step, -1):
file.write(f'{number}n')

# Normal dosyayı oku ve sayıları işle
with open(normal_filename, 'r') as file:
sayilar = file.read().splitlines()

# Sayıları tek tırnak ve virgülle ayırarak birleştir
birlesik_sayilar = "', '".join(sayilar)
sonuc = f"'{birlesik_sayilar}'"

# İşlenmiş dosyayı yaz
processed_filename = os.path.join(processed_folder, f'processed_numbers_{file_counter}.txt')
with open(processed_filename, 'w') as file:
file.write(sonuc + 'n')

# HTML dosyasını yaz
html_filename = os.path.join(html_folder, f'numbers_{file_counter}.txt')
with open(html_filename, 'w') as file:
for uid in sayilar:
new_html = template_html.format(uid=uid)
file.write(new_html + 'n')

# JavaScript dosyasını yaz
js_filename = os.path.join(js_folder, f'user_ids_{file_counter}.txt')
with open(js_filename, 'w') as file:
js_code = js_template.replace("{user_ids}", sonuc)
file.write(js_code)

file_counter += 1

except Exception as e:
print(f"Hata oluştu: {e}")

print(f'Toplam {file_counter - 1} normal, işlenmiş, HTML ve JavaScript dosyası oluşturuldu.')
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.