This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import os | |
import re | |
from telebot import TeleBot | |
from PIL import Image | |
from io import BytesIO | |
import datetime | |
from xmlrpc import client as xmlrpc_client | |
import unidecode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Enhancements to the Twitter Scraping Script: | |
This update to the script introduces a more robust mechanism for extracting detailed interaction data from tweets as they are scraped from Twitter. Previously, the script focused on collecting basic content such as the tweet's text. Now, it has been augmented to include a comprehensive extraction of interaction metrics, including replies, reposts, likes, bookmarks, and views, for each tweet. | |
Key Changes: | |
1. Improved Data Extraction: | |
- The script now searches through all elements within a tweet that have an `aria-label` attribute, filtering for labels that contain key interaction terms (replies, reposts, likes, bookmarks, views). This ensures that only relevant `aria-labels` are considered for data extraction. | |
2. Flexible Interaction Data Parsing: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Me: | |
I am looking to build a simple GUI site that allows me to paste in some text, click "rewrite", and get rewritten, cleaned-up text back. This input text is ran through the Claude API to rewrite it. The GUI should be very simple. I just want a text box for input and a text box for output. I also two sliders on the side with labels on the ends: | |
Tone: casual on the left, formal on the right. The middle instructs the model to keep the tone/voice the same. | |
Length: shorter on the left, longer on the right. | |
Above these sliders, I want a model selector dropdown that let's me pick which Claude model to use. I also want a copy text button under the output textbox. The three Claude models are: | |
claude-3-opus-20240229. Display name "Claude 3 Opus". | |
claude-3-sonnet-20240229. Display name "Claude 3 Sonnet". | |
claude-3-haiku-20240307. Display name "Claude 3 Haiku". |