TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #254 · 11 јун.

Тип строки в Python имеет очень много удобных методов. Сегодня пост про два таких метода которые чаще всего используются "однобоко". Это методы startswith() и endswith() Самый обычный сценарий использования — проверка, начинается ли строка с указанной подстроки? >>> "some_string".startswith("some") True И аналогичная ситуация с зеркальным вариантом этой функции, проверка совпадения с конца >>> "some_string".endswith("some") False Так они используются в большинстве случаев что я видел. Но у этих функций есть еще два варианта использования. 🔸Сравнение нескольких подстрок Для проверки нескольких подстрок в одной строке обычно вызывают эти функции несколько раз. Но на самом деле достаточно передать кортеж со всеми строками один раз. Если будет хоть одно совпадение то функция вернёт True. >>>"my_image.png".endswith(("jpg", "png", "exr")) True 🔸Диапазон поиска Вторым аргументом можно передать индекс символа с которого следует начать сравнение, а третий аргумент это индекс последнего символа. >>> ".filename.ext".startswith("file", 1) True >>> "file_###.ext".endswith('#', 0, -4) True Индексы можно указать отрицательными, что означает отсчёт с конца. #trics#basic

Hashtags

Резултати

Пронајдени 7 слични објави

Пребарај: #webscraping

当前筛选 #webscraping清除筛选
Repositorio data science

@repo_science · Post #3543 · 29.08.2023 г., 02:03

#Python#webscraping 😎 Automate the Boring Stuff with Python Programming Automate the Boring Stuff with Python was written for people who want to get up to speed writing small programs that do practical tasks as soon as possible. You don’t need to know sorting algorithms or object-oriented programming, so this course skips all the computer science and concentrates on writing code that gets stuff done. - Web scraping - Parsing PDFs and Excel spreadsheets - Automating the keyboard and mouse - Sending emails and texts - And several other practical topics ⚖️10.5 GB 🔗Link ----- Main channel:@repo_science Coupons: @freecoupons_reposcience -----

Repositorio data science

@repo_science · Post #3215 · 22.05.2023 г., 15:31

#python#webScraping 🐍 Scrapy masterclass: Python web scraping and data pipelines Work on 7 real-world web-scraping projects using Scrapy, Splash, and Selenium. Build data pipelines locally and on AWS 🔗Link ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

Repositorio data science

@repo_science · Post #3217 · 23.05.2023 г., 15:49

#webScraping El #UserAgent, o Agente de Usuario en español, es una cadena de texto que identifica el navegador web o la aplicación que se utiliza para acceder a un sitio web. Esta cadena se envía al servidor web en cada solicitud y puede contener información sobre el sistema operativo, el navegador web, la versión del navegador y los complementos utilizados. La información obtenida también puede utilizarse para optimizar la experiencia del usuario, por ejemplo, sirviendo contenido diseñado para funcionar mejor en un dispositivo móvil en lugar de una computadora portátil. Por otro lado, los webmasters pueden usar la información del user agent para verificar el reconocimiento de bots, para bloquear bots no deseados, o para algo como un análisis cruzado de usuarios o un análisis de la audiencia del sitio web. A continuación les dejamos una listado extenso de users-agents👇 🔗Lista de users-agents ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

Repositorio data science

@repo_science · Post #3180 · 12.05.2023 г., 19:53

#webScraping#Python#Scrapy 🐍 Scrapy course - Python web scraping for beginners The Scrapy #Beginners Course will teach you everything you need to learn to start scraping websites at scale using #Python Scrapy. Topics - Creating your first #Scrapy spider - #Crawling through websites & scraping data from each page - Cleaning data with Items & Item Pipelines - Saving data to CSV files, #MySQL & #Postgres#databases - Using fake #user-agents & headers to avoid getting blocked - Using #proxies to scale up your web scraping without getting banned - Deploying your #scraper to the cloud & scheduling it to run periodically 🗣️ Joe Kearney. 🔗Link 📢#youtube ⭐️ Resources ⭐️ Course Resources - Scrapy Docs - Course Guide - Course Github - The Python Scrapy Playbook ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

GitHub Trends

@githubtrending · Post #15520 · 24.02.2026 г., 14:30

#python#ai#ai_scraping#automation#crawler#crawling#crawling_python#data#data_extraction#mcp#mcp_server#playwright#python#scraping#selectors#stealth#web_scraper#web_scraping#web_scraping_python#webscraping#xpath Scrapling is a fast Python web scraping tool that fetches pages, bypasses anti-bot blocks like Cloudflare, and adapts to site changes by auto-finding elements. Use simple CSS/XPath selectors, spiders for big crawls with pause/resume, proxy rotation, and CLI—no code needed sometimes. Install via pip; it's memory-light and beats others in speed. You save time fixing broken scrapers, scrape reliably at scale, cut costs with AI tools, and focus on using data for leads, prices, or research. https://github.com/D4Vinci/Scrapling