alirezamika /
autoscraper
A Smart, Automatic, Fast and Lightweight Web Scraper for Python
Loading repository data…
udit-git / repository
A Smart, Automatic, Fast and Lightweight Web Scraper for Python

This project is made for automatic web scraping to make scraping easy. It gets a url or the html content of a web page and a list of sample data which we want to scrape from that page. This data can be text, url or any html tag value of that page. It learns the scraping rules and returns the similar elements. Then you can use this learned object with new urls to get similar content or the exact same element of those new pages.
It's compatible with python 3.
$ pip install autoscraper
$ python setup.py install
Say we want to fetch all related post titles in a stackoverflow page:
from autoscraper import AutoScraper
url = 'https://stackoverflow.com/questions/2081586/web-scraping-with-python'
# We can add one or multiple candidates here.
# You can also put urls here to retrieve urls.
wanted_list = ["What are metaclasses in Python?"]
scraper = AutoScraper()
result = scraper.build(url, wanted_list)
print(result)
Here's the output:
[
'How do I merge two dictionaries in a single expression in Python (taking union of dictionaries)?',
'How to call an external command?',
'What are metaclasses in Python?',
'Does Python have a ternary conditional operator?',
'How do you remove duplicates from a list whilst preserving order?',
'Convert bytes to a string',
'How to get line count of a large file cheaply in Python?',
"Does Python have a string 'contains' substring method?",
'Why is “1000000000000000 in range(1000000000000001)” so fast in Python 3?'
]
Now you can use the scraper object to get related topics of any stackoverflow page:
scraper.get_result_similar('https://stackoverflow.com/questions/606191/convert-bytes-to-a-string')
Say we want to scrape live stock prices from yahoo finance:
from autoscraper import AutoScraper
url = 'https://finance.yahoo.com/quote/AAPL/'
wanted_list = ["124.81"]
scraper = AutoScraper()
# Here we can also pass html content via the html parameter instead of the url (html=html_content)
result = scraper.build(url, wanted_list)
print(result)
Note that you should update the wanted_list if you want to copy this code, as the content of the page dynamically changes.
You can also pass any custom requests module parameter. for example you may want to use proxies or custom headers:
proxies = {
"http": 'http://127.0.0.1:8001',
"https": 'https://127.0.0.1:8001',
}
result = scraper.build(url, wanted_list, request_args=dict(proxies=proxies))
Now we can get the price of any symbol:
scraper.get_result_exact('https://finance.yahoo.com/quote/MSFT/')
You may want to get other info as well. For example if you want to get market cap too, you can just append it to the wanted list. By using the get_result_exact method, it will retrieve the data as the same exact order in the wanted list.
Another example: Say we want to scrape the about text, number of stars and the link to issues of Github repo pages:
from autoscraper import AutoScraper
url = 'https://github.com/udit-git/autoscraper'
wanted_list = ['A Smart, Automatic, Fast and Lightweight Web Scraper for Python', '2.5k', 'https://github.com/udit-git/autoscraper/issues']
scraper = AutoScraper()
scraper.build(url, wanted_list)
Simple, right?
We can now save the built model to use it later. To save:
# Give it a file path
scraper.save('yahoo-finance')
And to load:
scraper.load('yahoo-finance')
Feel free to open an issue if you have any problem using the module.
(As made by https://github.com/alirezamika/autoscraper)
Selected from shared topics, language and repository description—not editorial ratings.
alirezamika /
A Smart, Automatic, Fast and Lightweight Web Scraper for Python
With recent advances in both Artificial Intelligence (AI) and Internet of Things (IoT) capabilities, it is more possible than ever to implement surveillance systems that can automatically identify people who might represent a potential security threat to the public in real-time. Imagine a surveillance camera system that can detect various on-body weapons, suspicious objects, and traffic. This system could transform surveillance cameras from passive sentries into active observers, which would help prevent a possible mass shooting in a school, stadium, or mall. In this project, we tried to realize such systems by implementing Smart-Monitor, an AI-powered threat detector for intelligent surveillance cameras. The developed system can be deployed locally on the surveillance cameras at the network edge. Deploying AI-enabled surveillance applications at the edge enables the initial analysis of the captured images on-site, reducing the communication overheads and enabling swift security actions. We developed a mobile app that users can detect suspicious objects in an image and video captured by several cameras at the network edge. Also, the model can generate a high-quality segmentation mask for each object instance in the photo, along with the confidence percentage. The camera side used a Raspberry Pi 4 device, Neural Compute Stick 2 (NCS 2), Logitech C920 webcam, motion sensors, buzzers, pushbuttons, LED lights, Python Face recognition, and TensorFlow Custom Object Detection. When the system detects a motion in the surrounding environment, the motion sensors send a signal to the Raspberry Pi device notifying it to start capturing images for such physical activity. Using Python’s face recognition and TensorFlow 2 custom object detection Smart-Monitor can recognize eight classes, including a baseball bat, bird, cat, dog, gun, hammer, knife, and human faces. Finally, we evaluated our system using various performance metrics such as classification time and accuracy, scalability, etc.
ANISH-2814 /
⚙️ InnoVision – An 🤖 AI-powered industrial quality assurance system using YOLOv8, 🐍 Python, and 🍓 Raspberry Pi 4. Detects defective components in real-time 🎥 and automatically rejects them with a 🚀 servo mechanism. Includes 📡 ultrasonic detection, 🛞 conveyor control, and 💻 edge deployment for a smart, low-cost automation solution.
astromanu007 /
AI-Enhanced Smart Stethoscope for real-time cardiopulmonary diagnostics and telemedicine integration. This project integrates Artificial Intelligence (AI) with an enhanced stethoscope to provide real-time analysis and diagnostics of heart and lung sounds. 🚑📈 The AI model detects potential anomalies and automatically generates diagnostic reports.
ritikpandey01 /
🎯 Smart quiz solver for Any platform. Uses AI to automatically answer multiple choice questions and generate codes with 90% accuracy.
SyntaxilitY /
AutoReply AI (automatic-ai-based-response-reply) is an AI-first response automation engine that uses large language models to generate, classify, and send context-aware replies across messaging channels. It is designed to speed up customer support, automate routine communications, and act as a smart assistant for teams who need fast, accurate, and