{ "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", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
titleauthorlinkpubDate
0How PHP Switch Case StatementCodeExamplerhttps://dev.to/codeexamplerlearn/how-php-switc...Sun, 13 Feb 2022 12:28:53 +0000
1Laravel 8 - API VersioningDaleLantohttps://dev.to/dalelantowork/laravel-8-api-ver...Sun, 13 Feb 2022 11:50:43 +0000
2Laravel 8 - Using JWT(JSON Web Token) in REST APIDaleLantohttps://dev.to/dalelantowork/laravel-8-using-j...Sun, 13 Feb 2022 11:24:03 +0000
3What is Ory Hydra?Phongthorn Khamkankaewhttps://dev.to/altelma/what-is-ory-hydra-4dbnSat, 12 Feb 2022 23:48:00 +0000
4How to find the slowest query in your applicat...Cosme Escobedohttps://dev.to/cosmeoes/how-to-find-the-slowes...Sat, 12 Feb 2022 20:00:38 +0000
5SOLID Principles -Object Oriented Programming ...DaleLantohttps://dev.to/dalelantowork/solid-principles-...Sat, 12 Feb 2022 16:04:40 +0000
6How to Build and Distribute Beautiful Command-...Yannick Chenothttps://dev.to/osteel/how-to-build-and-distrib...Sat, 12 Feb 2022 15:55:41 +0000
7Laravel 8 - Factory and Seeders - Generating T...DaleLantohttps://dev.to/dalelantowork/laravel-8-factory...Sat, 12 Feb 2022 15:22:33 +0000
8How To Make Laravel Pusher Work In ProductionMacDonald Chikahttps://dev.to/macelux/how-to-make-laravel-pus...Sat, 12 Feb 2022 12:28:12 +0000
9Import Excel File into Laravel 8TechTool Indiahttps://dev.to/techtoolindia/import-excel-file...Sat, 12 Feb 2022 10:56:31 +0000
10How to import excel CSV file into Laravelshani singhhttps://dev.to/shanisingh03/how-to-import-exce...Sat, 12 Feb 2022 10:52:57 +0000
11Cara Beralih atau Berpindah di antara beberapa...Muhammad Iqbalhttps://dev.to/dibaliqaja/cara-beralih-atau-be...Sat, 12 Feb 2022 07:14:25 +0000
\n", "
" ], "text/plain": [ " title author \\\n", "0 How PHP Switch Case Statement CodeExampler \n", "1 Laravel 8 - API Versioning DaleLanto \n", "2 Laravel 8 - Using JWT(JSON Web Token) in REST API DaleLanto \n", "3 What is Ory Hydra? Phongthorn Khamkankaew \n", "4 How to find the slowest query in your applicat... Cosme Escobedo \n", "5 SOLID Principles -Object Oriented Programming ... DaleLanto \n", "6 How to Build and Distribute Beautiful Command-... Yannick Chenot \n", "7 Laravel 8 - Factory and Seeders - Generating T... DaleLanto \n", "8 How To Make Laravel Pusher Work In Production MacDonald Chika \n", "9 Import Excel File into Laravel 8 TechTool India \n", "10 How to import excel CSV file into Laravel shani singh \n", "11 Cara Beralih atau Berpindah di antara beberapa... Muhammad Iqbal \n", "\n", " link \\\n", "0 https://dev.to/codeexamplerlearn/how-php-switc... \n", "1 https://dev.to/dalelantowork/laravel-8-api-ver... \n", "2 https://dev.to/dalelantowork/laravel-8-using-j... \n", "3 https://dev.to/altelma/what-is-ory-hydra-4dbn \n", "4 https://dev.to/cosmeoes/how-to-find-the-slowes... \n", "5 https://dev.to/dalelantowork/solid-principles-... \n", "6 https://dev.to/osteel/how-to-build-and-distrib... \n", "7 https://dev.to/dalelantowork/laravel-8-factory... \n", "8 https://dev.to/macelux/how-to-make-laravel-pus... \n", "9 https://dev.to/techtoolindia/import-excel-file... \n", "10 https://dev.to/shanisingh03/how-to-import-exce... \n", "11 https://dev.to/dibaliqaja/cara-beralih-atau-be... \n", "\n", " pubDate \n", "0 Sun, 13 Feb 2022 12:28:53 +0000 \n", "1 Sun, 13 Feb 2022 11:50:43 +0000 \n", "2 Sun, 13 Feb 2022 11:24:03 +0000 \n", "3 Sat, 12 Feb 2022 23:48:00 +0000 \n", "4 Sat, 12 Feb 2022 20:00:38 +0000 \n", "5 Sat, 12 Feb 2022 16:04:40 +0000 \n", "6 Sat, 12 Feb 2022 15:55:41 +0000 \n", "7 Sat, 12 Feb 2022 15:22:33 +0000 \n", "8 Sat, 12 Feb 2022 12:28:12 +0000 \n", "9 Sat, 12 Feb 2022 10:56:31 +0000 \n", "10 Sat, 12 Feb 2022 10:52:57 +0000 \n", "11 Sat, 12 Feb 2022 07:14:25 +0000 " ] }, "execution_count": 391, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dev_to.head(100)" ] } ], "metadata": { "interpreter": { "hash": "f22a20af907fde35ff19e1e892fdb271353fb19b11c7ebd774491472e685293c" }, "kernelspec": { "display_name": "Python 3.9.9 64-bit", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }