Twitter Da Birinin Attığı Tweetleri Kaydetmek
-
Bir takip ettiğim hesap var bazen attiğı tweetleri siliyor her tweetini görmek istiyorum 7 24 takip edemeyeceğim icin onun attigi tweetleri silse bile baska bir yere otomatik nasıl kaydettiririm .
Bosluk tarafından 09/Oca/23 22:13 tarihinde düzenlenmiştir -
hımm güzel proje
-
netlytic.org isini gorur diye dusunuyorum.
-
<?php // Set the user's screen name $screen_name = 'USERNAME'; // Retrieve the HTML of the user's timeline page $html = file_get_contents('https://twitter.com/' . $screen_name); // Parse the HTML to extract the tweet IDs $tweet_ids = extract_tweet_ids($html); // Send each tweet ID to archive.is for saving foreach ($tweet_ids as $tweet_id) { $url = 'http://archive.is/submit/'; $data = array( 'url' => 'https://twitter.com/' . $screen_name . '/status/' . $tweet_id ); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === FALSE) { // Error saving tweet echo "Error saving tweet with ID " . $tweet_id . "\n"; } else { // Tweet saved successfully echo "Tweet with ID " . $tweet_id . " saved successfully.\n"; } } // Function to extract tweet IDs from the HTML of a Twitter timeline function extract_tweet_ids($html) { // Use the DOMDocument or Simple HTML DOM Parser library to parse the HTML // and extract the tweet IDs // ... return $tweet_ids; } ?>
PHP kullanmak istersen bunu deneyebilirsin, çalıştırmadım ama muhtemelen iş görür. Tweetlerin archive.is yedeğini alıyor. Cronjob ile belirli sürede çalıştırıp son tweeti kaydedebilirsiniz
-
JpnTr bunu yazdı
PHP kullanmak istersen bunu deneyebilirsin, çalıştırmadım ama muhtemelen iş görür. Tweetlerin archive.is yedeğini alıyor. Cronjob ile belirli sürede çalıştırıp son tweeti kaydedebilirsiniz
Aynen, bunu bir web sitesine atıp aşağıda ki siteden de tetikletebilirizsiniz.
https://cron-job.org/en/
-
Şu an kod olarak yazacak vaktim yok ancak yol gösterebilirim:
Google sheets üzerinden sürekli çalışacak küçük bir makro yazarsın. Son tweeti çeksin, tabloya tarih ile birlikte kayıt etsin. Cronjob gibi sürekli çalıştırma olayı var.