from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, "myDynamicElement"))
)
β’ Get the page source after JavaScript has executed.
dynamic_html = driver.page_source
β’ Close the browser window.
driver.quit()
VII. Common Tasks & Best Practices
β’ Handle pagination by finding the "Next" link.
next_page_url = soup.find('a', text='Next')['href']β’ Save data to a CSV file.
import csv
with open('data.csv', 'w', newline='', encoding='utf-8') as f:
writer = csv.writer(f)
writer.writerow(['Title', 'Link'])
# writer.writerow([title, url]) in a loop
β’ Save data to CSV using
pandas.import pandas as pd
df = pd.DataFrame(data, columns=['Title', 'Link'])
df.to_csv('data.csv', index=False)
β’ Use a proxy with
requests.proxies = {'http': 'http://10.10.1.10:3128', 'https': 'http://10.10.1.10:1080'}
requests.get('http://example.com', proxies=proxies)β’ Pause between requests to be polite.
import time
time.sleep(2) # Pause for 2 seconds
β’ Handle JSON data from an API.
json_response = requests.get('https://api.example.com/data').json()β’ Download a file (like an image).
img_url = 'http://example.com/image.jpg'
img_data = requests.get(img_url).content
with open('image.jpg', 'wb') as handler:
handler.write(img_data)
β’ Parse a
sitemap.xml to find all URLs.# Get the sitemap.xml file and parse it like any other XML/HTML to extract <loc> tags.
VIII. Advanced Frameworks (
Scrapy)β’ Create a Scrapy spider (conceptual command).
scrapy genspider example example.com
β’ Define a
parse method to process the response.# In your spider class:
def parse(self, response):
# parsing logic here
pass
β’ Extract data using Scrapy's CSS selectors.
titles = response.css('h1::text').getall()β’ Extract data using Scrapy's XPath selectors.
links = response.xpath('//a/@href').getall()β’ Yield a dictionary of scraped data.
yield {'title': response.css('title::text').get()}β’ Follow a link to parse the next page.
next_page = response.css('li.next a::attr(href)').get()
if next_page is not None:
yield response.follow(next_page, callback=self.parse)β’ Run a spider from the command line.
scrapy crawl example -o output.json
β’ Pass arguments to a spider.
scrapy crawl example -a category=books
β’ Create a Scrapy Item for structured data.
import scrapy
class ProductItem(scrapy.Item):
name = scrapy.Field()
price = scrapy.Field()
β’ Use an Item Loader to populate Items.
from scrapy.loader import ItemLoader
loader = ItemLoader(item=ProductItem(), response=response)
loader.add_css('name', 'h1.product-name::text')
#Python #WebScraping #BeautifulSoup #Selenium #Requests
βββββββββββββββ
By: @DataScienceN β¨
β€3
π₯ Trending Repository: nocobase
π Description: NocoBase is the most extensible AI-powered no-code/low-code platform for building business applications and enterprise solutions.
π Repository URL: https://github.com/nocobase/nocobase
π Website: https://www.nocobase.com
π Readme: https://github.com/nocobase/nocobase#readme
π Statistics:
π Stars: 17.7K stars
π Watchers: 147
π΄ Forks: 2K forks
π» Programming Languages: TypeScript - JavaScript - Smarty - Shell - Dockerfile - Less
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: NocoBase is the most extensible AI-powered no-code/low-code platform for building business applications and enterprise solutions.
π Repository URL: https://github.com/nocobase/nocobase
π Website: https://www.nocobase.com
π Readme: https://github.com/nocobase/nocobase#readme
π Statistics:
π Stars: 17.7K stars
π Watchers: 147
π΄ Forks: 2K forks
π» Programming Languages: TypeScript - JavaScript - Smarty - Shell - Dockerfile - Less
π·οΈ Related Topics:
#internal_tools #crud #crm #admin_dashboard #self_hosted #web_application #project_management #salesforce #developer_tools #airtable #workflows #low_code #no_code #app_builder #internal_tool #nocode #low_code_development_platform #no_code_platform #low_code_platform #low_code_framework
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: alertmanager
π Description: Prometheus Alertmanager
π Repository URL: https://github.com/prometheus/alertmanager
π Website: https://prometheus.io
π Readme: https://github.com/prometheus/alertmanager#readme
π Statistics:
π Stars: 7.3K stars
π Watchers: 166
π΄ Forks: 2.3K forks
π» Programming Languages: Go - Elm - HTML - Makefile - TypeScript - JavaScript
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Prometheus Alertmanager
π Repository URL: https://github.com/prometheus/alertmanager
π Website: https://prometheus.io
π Readme: https://github.com/prometheus/alertmanager#readme
π Statistics:
π Stars: 7.3K stars
π Watchers: 166
π΄ Forks: 2.3K forks
π» Programming Languages: Go - Elm - HTML - Makefile - TypeScript - JavaScript
π·οΈ Related Topics:
#notifications #slack #monitoring #email #pagerduty #alertmanager #hacktoberfest #deduplication #opsgenie
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: gopeed
π Description: A modern download manager that supports all platforms. Built with Golang and Flutter.
π Repository URL: https://github.com/GopeedLab/gopeed
π Website: https://gopeed.com
π Readme: https://github.com/GopeedLab/gopeed#readme
π Statistics:
π Stars: 21K stars
π Watchers: 167
π΄ Forks: 1.5K forks
π» Programming Languages: Dart - Go - C++ - CMake - Swift - Ruby
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: A modern download manager that supports all platforms. Built with Golang and Flutter.
π Repository URL: https://github.com/GopeedLab/gopeed
π Website: https://gopeed.com
π Readme: https://github.com/GopeedLab/gopeed#readme
π Statistics:
π Stars: 21K stars
π Watchers: 167
π΄ Forks: 1.5K forks
π» Programming Languages: Dart - Go - C++ - CMake - Swift - Ruby
π·οΈ Related Topics:
#android #windows #macos #golang #http #ios #torrent #downloader #debian #bittorrent #cross_platform #ubuntu #https #flutter #magnet
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: vertex-ai-creative-studio
π Description: GenMedia Creative Studio is a Vertex AI generative media user experience highlighting the use of Imagen, Veo, Gemini π, Gemini TTS, Chirp 3, Lyria and other generative media APIs on Google Cloud.
π Repository URL: https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio
π Readme: https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio#readme
π Statistics:
π Stars: 512 stars
π Watchers: 19
π΄ Forks: 200 forks
π» Programming Languages: Jupyter Notebook - Python - TypeScript - Go - JavaScript - Shell
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: GenMedia Creative Studio is a Vertex AI generative media user experience highlighting the use of Imagen, Veo, Gemini π, Gemini TTS, Chirp 3, Lyria and other generative media APIs on Google Cloud.
π Repository URL: https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio
π Readme: https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio#readme
π Statistics:
π Stars: 512 stars
π Watchers: 19
π΄ Forks: 200 forks
π» Programming Languages: Jupyter Notebook - Python - TypeScript - Go - JavaScript - Shell
π·οΈ Related Topics:
#google_cloud #gemini #chirp #imagen #veo #lyria #vertex_ai #nano_banana
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: Parabolic
π Description: Download web video and audio
π Repository URL: https://github.com/NickvisionApps/Parabolic
π Website: https://flathub.org/apps/details/org.nickvision.tubeconverter
π Readme: https://github.com/NickvisionApps/Parabolic#readme
π Statistics:
π Stars: 4.1K stars
π Watchers: 28
π΄ Forks: 188 forks
π» Programming Languages: C++ - CMake - Python - Inno Setup - C - CSS
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Download web video and audio
π Repository URL: https://github.com/NickvisionApps/Parabolic
π Website: https://flathub.org/apps/details/org.nickvision.tubeconverter
π Readme: https://github.com/NickvisionApps/Parabolic#readme
π Statistics:
π Stars: 4.1K stars
π Watchers: 28
π΄ Forks: 188 forks
π» Programming Languages: C++ - CMake - Python - Inno Setup - C - CSS
π·οΈ Related Topics:
#music #windows #downloader #youtube #qt #cpp #youtube_dl #gnome #videos #flathub #gtk4 #yt_dlp #libadwaita
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: localstack
π Description: π» A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline
π Repository URL: https://github.com/localstack/localstack
π Website: https://localstack.cloud
π Readme: https://github.com/localstack/localstack#readme
π Statistics:
π Stars: 61.1K stars
π Watchers: 514
π΄ Forks: 4.3K forks
π» Programming Languages: Python - Shell - Makefile - ANTLR - JavaScript - Java
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: π» A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline
π Repository URL: https://github.com/localstack/localstack
π Website: https://localstack.cloud
π Readme: https://github.com/localstack/localstack#readme
π Statistics:
π Stars: 61.1K stars
π Watchers: 514
π΄ Forks: 4.3K forks
π» Programming Languages: Python - Shell - Makefile - ANTLR - JavaScript - Java
π·οΈ Related Topics:
#python #testing #aws #cloud #continuous_integration #developer_tools #localstack
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: go-sdk
π Description: The official Go SDK for Model Context Protocol servers and clients. Maintained in collaboration with Google.
π Repository URL: https://github.com/modelcontextprotocol/go-sdk
π Readme: https://github.com/modelcontextprotocol/go-sdk#readme
π Statistics:
π Stars: 2.7K stars
π Watchers: 39
π΄ Forks: 249 forks
π» Programming Languages: Go
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: The official Go SDK for Model Context Protocol servers and clients. Maintained in collaboration with Google.
π Repository URL: https://github.com/modelcontextprotocol/go-sdk
π Readme: https://github.com/modelcontextprotocol/go-sdk#readme
π Statistics:
π Stars: 2.7K stars
π Watchers: 39
π΄ Forks: 249 forks
π» Programming Languages: Go
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: rachoon
π Description: π¦ Rachoon β A self-hostable way to handle invoices
π Repository URL: https://github.com/ad-on-is/rachoon
π Readme: https://github.com/ad-on-is/rachoon#readme
π Statistics:
π Stars: 292 stars
π Watchers: 4
π΄ Forks: 14 forks
π» Programming Languages: TypeScript - Vue - HTML - SCSS - Dockerfile - JavaScript - Shell
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: π¦ Rachoon β A self-hostable way to handle invoices
π Repository URL: https://github.com/ad-on-is/rachoon
π Readme: https://github.com/ad-on-is/rachoon#readme
π Statistics:
π Stars: 292 stars
π Watchers: 4
π΄ Forks: 14 forks
π» Programming Languages: TypeScript - Vue - HTML - SCSS - Dockerfile - JavaScript - Shell
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: Kotatsu
π Description: Manga reader for Android
π Repository URL: https://github.com/KotatsuApp/Kotatsu
π Website: https://kotatsu.app
π Readme: https://github.com/KotatsuApp/Kotatsu#readme
π Statistics:
π Stars: 7.2K stars
π Watchers: 72
π΄ Forks: 366 forks
π» Programming Languages: Kotlin
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Manga reader for Android
π Repository URL: https://github.com/KotatsuApp/Kotatsu
π Website: https://kotatsu.app
π Readme: https://github.com/KotatsuApp/Kotatsu#readme
π Statistics:
π Stars: 7.2K stars
π Watchers: 72
π΄ Forks: 366 forks
π» Programming Languages: Kotlin
π·οΈ Related Topics:
#android #manga #comics #mangareader #manga_reader #webtoon
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: ggml
π Description: Tensor library for machine learning
π Repository URL: https://github.com/ggml-org/ggml
π Readme: https://github.com/ggml-org/ggml#readme
π Statistics:
π Stars: 13.4K stars
π Watchers: 141
π΄ Forks: 1.4K forks
π» Programming Languages: C++ - C - Cuda - Metal - GLSL - CMake
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Tensor library for machine learning
π Repository URL: https://github.com/ggml-org/ggml
π Readme: https://github.com/ggml-org/ggml#readme
π Statistics:
π Stars: 13.4K stars
π Watchers: 141
π΄ Forks: 1.4K forks
π» Programming Languages: C++ - C - Cuda - Metal - GLSL - CMake
π·οΈ Related Topics:
#machine_learning #automatic_differentiation #tensor_algebra #large_language_models
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: asm-lessons
π Description: FFMPEG Assembly Language Lessons
π Repository URL: https://github.com/FFmpeg/asm-lessons
π Readme: https://github.com/FFmpeg/asm-lessons#readme
π Statistics:
π Stars: 9.7K stars
π Watchers: 153
π΄ Forks: 288 forks
π» Programming Languages: Not available
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: FFMPEG Assembly Language Lessons
π Repository URL: https://github.com/FFmpeg/asm-lessons
π Readme: https://github.com/FFmpeg/asm-lessons#readme
π Statistics:
π Stars: 9.7K stars
π Watchers: 153
π΄ Forks: 288 forks
π» Programming Languages: Not available
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
β€1
π₯ Trending Repository: lima
π Description: Linux virtual machines, with a focus on running containers
π Repository URL: https://github.com/lima-vm/lima
π Website: https://lima-vm.io/
π Readme: https://github.com/lima-vm/lima#readme
π Statistics:
π Stars: 18.4K stars
π Watchers: 83
π΄ Forks: 722 forks
π» Programming Languages: Go - Shell - Makefile - Perl - HTML - SCSS
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Linux virtual machines, with a focus on running containers
π Repository URL: https://github.com/lima-vm/lima
π Website: https://lima-vm.io/
π Readme: https://github.com/lima-vm/lima#readme
π Statistics:
π Stars: 18.4K stars
π Watchers: 83
π΄ Forks: 722 forks
π» Programming Languages: Go - Shell - Makefile - Perl - HTML - SCSS
π·οΈ Related Topics:
#macos #vm #qemu #containerd
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: mcp
π Description: AWS MCP Servers β helping you get the most out of AWS, wherever you use MCP.
π Repository URL: https://github.com/awslabs/mcp
π Website: https://awslabs.github.io/mcp/
π Readme: https://github.com/awslabs/mcp#readme
π Statistics:
π Stars: 7K stars
π Watchers: 68
π΄ Forks: 1K forks
π» Programming Languages: Python - Shell - Dockerfile - HTML - TypeScript - Jinja
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: AWS MCP Servers β helping you get the most out of AWS, wherever you use MCP.
π Repository URL: https://github.com/awslabs/mcp
π Website: https://awslabs.github.io/mcp/
π Readme: https://github.com/awslabs/mcp#readme
π Statistics:
π Stars: 7K stars
π Watchers: 68
π΄ Forks: 1K forks
π» Programming Languages: Python - Shell - Dockerfile - HTML - TypeScript - Jinja
π·οΈ Related Topics:
#aws #mcp #mcp_servers #mcp_server #modelcontextprotocol #mcp_client #mcp_tools #mcp_host #mcp_clients
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: strix
π Description: β¨ Open-source AI hackers for your apps π¨π»βπ»
π Repository URL: https://github.com/usestrix/strix
π Website: https://usestrix.com/
π Readme: https://github.com/usestrix/strix#readme
π Statistics:
π Stars: 3K stars
π Watchers: 38
π΄ Forks: 394 forks
π» Programming Languages: Python - Jinja - Dockerfile
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: β¨ Open-source AI hackers for your apps π¨π»βπ»
π Repository URL: https://github.com/usestrix/strix
π Website: https://usestrix.com/
π Readme: https://github.com/usestrix/strix#readme
π Statistics:
π Stars: 3K stars
π Watchers: 38
π΄ Forks: 394 forks
π» Programming Languages: Python - Jinja - Dockerfile
π·οΈ Related Topics:
#artificial_intelligence #cybersecurity #penetration_testing #agents #llm #generative_ai
==================================
π§ By: https://t.iss.one/DataScienceM
β€1
π₯ Trending Repository: frigate
π Description: NVR with realtime local object detection for IP cameras
π Repository URL: https://github.com/blakeblackshear/frigate
π Website: https://frigate.video
π Readme: https://github.com/blakeblackshear/frigate#readme
π Statistics:
π Stars: 26.8K stars
π Watchers: 218
π΄ Forks: 2.5K forks
π» Programming Languages: TypeScript - Python - CSS - Shell - Dockerfile - JavaScript
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: NVR with realtime local object detection for IP cameras
π Repository URL: https://github.com/blakeblackshear/frigate
π Website: https://frigate.video
π Readme: https://github.com/blakeblackshear/frigate#readme
π Statistics:
π Stars: 26.8K stars
π Watchers: 218
π΄ Forks: 2.5K forks
π» Programming Languages: TypeScript - Python - CSS - Shell - Dockerfile - JavaScript
π·οΈ Related Topics:
#home_automation #mqtt #ai #camera #rtsp #tensorflow #nvr #realtime #home_assistant #homeautomation #object_detection #google_coral
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: gumroad
π Description: Sell stuff and see what sticks
π Repository URL: https://github.com/antiwork/gumroad
π Website: https://gumroad.com
π Readme: https://github.com/antiwork/gumroad#readme
π Statistics:
π Stars: 7.4K stars
π Watchers: 50
π΄ Forks: 1.4K forks
π» Programming Languages: Ruby - TypeScript - HTML - SCSS - Shell - JavaScript
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Sell stuff and see what sticks
π Repository URL: https://github.com/antiwork/gumroad
π Website: https://gumroad.com
π Readme: https://github.com/antiwork/gumroad#readme
π Statistics:
π Stars: 7.4K stars
π Watchers: 50
π΄ Forks: 1.4K forks
π» Programming Languages: Ruby - TypeScript - HTML - SCSS - Shell - JavaScript
π·οΈ Related Topics: Not available
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: code-server
π Description: VS Code in the browser
π Repository URL: https://github.com/coder/code-server
π Website: https://coder.com
π Readme: https://github.com/coder/code-server#readme
π Statistics:
π Stars: 74.6K stars
π Watchers: 734
π΄ Forks: 6.3K forks
π» Programming Languages: TypeScript - Shell - HTML - CSS - HCL - JavaScript
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: VS Code in the browser
π Repository URL: https://github.com/coder/code-server
π Website: https://coder.com
π Readme: https://github.com/coder/code-server#readme
π Statistics:
π Stars: 74.6K stars
π Watchers: 734
π΄ Forks: 6.3K forks
π» Programming Languages: TypeScript - Shell - HTML - CSS - HCL - JavaScript
π·οΈ Related Topics:
#ide #vscode #development_environment #remote_work #dev_tools #browser_ide #vscode_remote
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: dbeaver
π Description: Free universal database tool and SQL client
π Repository URL: https://github.com/dbeaver/dbeaver
π Website: https://dbeaver.io
π Readme: https://github.com/dbeaver/dbeaver#readme
π Statistics:
π Stars: 46.1K stars
π Watchers: 527
π΄ Forks: 3.9K forks
π» Programming Languages: Java - C++ - ANTLR - CSS - HTML - XSLT
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Free universal database tool and SQL client
π Repository URL: https://github.com/dbeaver/dbeaver
π Website: https://dbeaver.io
π Readme: https://github.com/dbeaver/dbeaver#readme
π Statistics:
π Stars: 46.1K stars
π Watchers: 527
π΄ Forks: 3.9K forks
π» Programming Languages: Java - C++ - ANTLR - CSS - HTML - XSLT
π·οΈ Related Topics:
#mysql #java #gui #sql #database #ai #nosql #jdbc #sqlite #postgresql #oracle #openai #dbeaver #erd #redshift #db2 #sqlserver #copilot
==================================
π§ By: https://t.iss.one/DataScienceM
π₯ Trending Repository: umami
π Description: Umami is a modern, privacy-focused alternative to Google Analytics.
π Repository URL: https://github.com/umami-software/umami
π Website: https://umami.is
π Readme: https://github.com/umami-software/umami#readme
π Statistics:
π Stars: 31.8K stars
π Watchers: 128
π΄ Forks: 5.8K forks
π» Programming Languages: TypeScript - JavaScript
π·οΈ Related Topics:
==================================
π§ By: https://t.iss.one/DataScienceM
π Description: Umami is a modern, privacy-focused alternative to Google Analytics.
π Repository URL: https://github.com/umami-software/umami
π Website: https://umami.is
π Readme: https://github.com/umami-software/umami#readme
π Statistics:
π Stars: 31.8K stars
π Watchers: 128
π΄ Forks: 5.8K forks
π» Programming Languages: TypeScript - JavaScript
π·οΈ Related Topics:
#charts #statistics #analytics #google_analytics #web_analytics
==================================
π§ By: https://t.iss.one/DataScienceM