{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## **Web Parser RSS** at **dev.to**\n", "```\n", "Link Web Scraping :\n", "https://dev.to\n", "\n", "Code By Natasya \n", "medium.com/@liontin\n", "```" ] }, { "cell_type": "code", "execution_count": 386, "metadata": {}, "outputs": [], "source": [ "import requests\n", "from bs4 import BeautifulSoup\n", "import pandas as pd\n", "import plotly.express as px" ] }, { "cell_type": "code", "execution_count": 387, "metadata": {}, "outputs": [], "source": [ "tag = input('tags name :')\n", "url = \"https://dev.to/feed/tag/\"+tag\n", "\n", "req = requests.get(url)\n", "\n", "dev = BeautifulSoup(req.content, features=\"xml\")" ] }, { "cell_type": "code", "execution_count": 388, "metadata": {}, "outputs": [], "source": [ "devto = []\n", "get_tags = dev.findAll('item')\n", "for to in get_tags:\n", " tags_by = {}\n", " tags_by['title'] = to.title.text\n", " tags_by['author'] = to.author.text\n", " tags_by['link'] = to.link.text\n", " tags_by['pubDate'] = to.pubDate.text\n", " devto.append(tags_by)" ] }, { "cell_type": "code", "execution_count": 389, "metadata": {}, "outputs": [], "source": [ "dev_to = pd.DataFrame(devto,columns=['title','author','link','pubDate'])" ] }, { "cell_type": "code", "execution_count": 391, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | title | \n", "author | \n", "link | \n", "pubDate | \n", "
---|---|---|---|---|
0 | \n", "How PHP Switch Case Statement | \n", "CodeExampler | \n", "https://dev.to/codeexamplerlearn/how-php-switc... | \n", "Sun, 13 Feb 2022 12:28:53 +0000 | \n", "
1 | \n", "Laravel 8 - API Versioning | \n", "DaleLanto | \n", "https://dev.to/dalelantowork/laravel-8-api-ver... | \n", "Sun, 13 Feb 2022 11:50:43 +0000 | \n", "
2 | \n", "Laravel 8 - Using JWT(JSON Web Token) in REST API | \n", "DaleLanto | \n", "https://dev.to/dalelantowork/laravel-8-using-j... | \n", "Sun, 13 Feb 2022 11:24:03 +0000 | \n", "
3 | \n", "What is Ory Hydra? | \n", "Phongthorn Khamkankaew | \n", "https://dev.to/altelma/what-is-ory-hydra-4dbn | \n", "Sat, 12 Feb 2022 23:48:00 +0000 | \n", "
4 | \n", "How to find the slowest query in your applicat... | \n", "Cosme Escobedo | \n", "https://dev.to/cosmeoes/how-to-find-the-slowes... | \n", "Sat, 12 Feb 2022 20:00:38 +0000 | \n", "
5 | \n", "SOLID Principles -Object Oriented Programming ... | \n", "DaleLanto | \n", "https://dev.to/dalelantowork/solid-principles-... | \n", "Sat, 12 Feb 2022 16:04:40 +0000 | \n", "
6 | \n", "How to Build and Distribute Beautiful Command-... | \n", "Yannick Chenot | \n", "https://dev.to/osteel/how-to-build-and-distrib... | \n", "Sat, 12 Feb 2022 15:55:41 +0000 | \n", "
7 | \n", "Laravel 8 - Factory and Seeders - Generating T... | \n", "DaleLanto | \n", "https://dev.to/dalelantowork/laravel-8-factory... | \n", "Sat, 12 Feb 2022 15:22:33 +0000 | \n", "
8 | \n", "How To Make Laravel Pusher Work In Production | \n", "MacDonald Chika | \n", "https://dev.to/macelux/how-to-make-laravel-pus... | \n", "Sat, 12 Feb 2022 12:28:12 +0000 | \n", "
9 | \n", "Import Excel File into Laravel 8 | \n", "TechTool India | \n", "https://dev.to/techtoolindia/import-excel-file... | \n", "Sat, 12 Feb 2022 10:56:31 +0000 | \n", "
10 | \n", "How to import excel CSV file into Laravel | \n", "shani singh | \n", "https://dev.to/shanisingh03/how-to-import-exce... | \n", "Sat, 12 Feb 2022 10:52:57 +0000 | \n", "
11 | \n", "Cara Beralih atau Berpindah di antara beberapa... | \n", "Muhammad Iqbal | \n", "https://dev.to/dibaliqaja/cara-beralih-atau-be... | \n", "Sat, 12 Feb 2022 07:14:25 +0000 | \n", "