Get Qiita trends in Python.
> python -V
Python 3.8.2
requests and beautifulsoup4
> pip install requests beautifulsoup4
qiita.py
import requests
from bs4 import BeautifulSoup
import json
import re
html = requests.get('https://qiita.com')
qiita = BeautifulSoup(html.content, "html.parser")
qiita.select('div[data-hyperapp-app="Trend"]')
target_div = qiita.select('div[data-hyperapp-app="Trend"]')[0]
trend_items = json.loads(target_div.get('data-hyperapp-props'))
for v in trend_items['trend']['edges']:
print(v['node']['title'])
> python qiita.py
5 masterpieces of data science that you can learn for free [Japanese books are not scary if you can speak English even if they are expensive]
I summarized 11 types of operating systems
Even beginners want to say "I fully understand Python"
Quick learning from super basics Docker(1)
How to create a virtual DOM
ESLint v7.0.Summary of 0 changes
Flutter Hatsumi has developed an app in a 5-day hackathon
What is "functional programming" and "object-oriented" in Python?
Build the strongest Laravel development environment using Docker [new edition]
Use case driven development for DDD that can be used from tomorrow (ICONIX process)
Enigma cryptography with simple linear algebra
Measure the rotation period of Rinsei
Let's explain mem2reg
Let's make a typing game with Processing!
Shell art that runs life games with ImageMagick
[Automation] Detects website changes and notifies LINE
I wrote the command judgment of the fighting game in Reactive
Implement ancient ciphers in python
I tried to summarize the functions required to compete in Python~itertools~
How to create a community-driven SaaS
Rotate the motor "on your own" with ST's motor control development kit Vol.1 Forced commutation
Ggplot with nested data
High Availability Solution for Oracle Database SE Standard Edition High Availability has been released
[Sad news] The holidays are over [Vue.js +Calendar created with Django REST framework]
PostgreSQL 13 is coming!(6) -Improvements to psql
API usage ranking in prototypes May 2020 version (comparison with 2015)-From smartphone apps to the physical world- #protopedia
Netlify for the first time:Minimal steps to publish your site with git push
Introducing Web Vitals and its tools that rearranged and quantified Web UX indicators into three
Deep Learning from scratch 4.4.2 Gradient with respect to neural network numerical_The question about the gradient function has been resolved.
From zero to Blazor (from project creation to login function implementation)
Recommended Posts