Try to get a list of breaking news threads in Python.

After studying Python, I tried to get a thread list of breaking news (dislike).

environment

get_kenmo.py


# -*- coding: utf-8 -*-
import urllib

def get_kenmo():
    response = urllib.urlopen('http://engawa.2ch.net/poverty/subject.txt')
    html = unicode(response.read(), "cp932", 'ignore').encode("utf-8")
    for line in html.split("\n"):
        if line != "":
            print(line.split("<>", 2)[1])

if __name__ == "__main__":
    get_kenmo()

Where I stumbled

Recommended Posts

Try to get a list of breaking news threads in Python.
How to get a list of built-in exceptions in python
How to get a list of files in the same directory with python
Try to get the function list of Python> os package
Get the number of specific elements in a python list
Developed a library to get Kindle collection list in Python
How to get the last (last) value in a list in Python
Display a list of alphabets in Python 3
How to get a stacktrace in python
[python] Get a list of instance variables
[Python] Get a list of folders only
Get a list of files in a folder with python without a path
Get the value of a specific key up to the specified index in the dictionary list in Python
Try to calculate a statistical problem in Python
How to clear tuples in a list (Python)
Get the caller of a function in Python
Make a copy of the list in Python
Get a glimpse of machine learning in Python
Get a list of packages installed in your current environment with python
[Python] How to put any number of standard inputs in a list
[Linux] Command to get a list of commands executed in the past
How to format a list of dictionaries (or instances) well in Python
[Python] [Word] [python-docx] Try to create a template of a word sentence in Python using python-docx
Try to make a Python module in C language
How to get the number of digits in Python
[python] Get the list of classes defined in the module
How to write a list / dictionary type of Python3
Things to note when initializing a list in Python
Python script to get a list of input examples for the AtCoder contest
Python: Get a list of methods for an object
Group by consecutive elements of a list in Python
How to identify the element with the smallest number of characters in a Python list?
How to check in Python if one of the elements of a list is in another list
[Python] How to make a list of character strings character by character
How to shuffle a part of a Python list (at random.shuffle)
[Command] Command to get a list of files containing double-byte characters
Get a list of purchased DMM eBooks with Python + Selenium
Since Python 1.5 of Discord, I can't get a list of members
I tried "How to get a method decorated in Python"
How to develop in a virtual environment of Python [Memo]
Get index of nth largest / smallest value in list in Python
How to get a list of links from a page from wikipedia
Just try to receive a webhook in ngrok and python
How to get a quadratic array of squares in a spiral!
Get index of nth largest / smallest value in list in Python
[python] Manage functions in a list
Try to calculate Trace in Python
Python> Get a list of files in multiple directories> Use glob | Sort by modification time
[Python] How to delete rows and columns in a table (list of drop method options)
[OCI] Python script to get the IP address of a compute instance in Cloud Shell
Recursively get the Excel list in a specific folder with python and write it to Excel.
I tried to create a Python script to get the value of a cell in Microsoft Excel
When I got a list of study sessions in Python, I found something I wanted to make
How to pass the execution result of a shell command in a list in Python (non-blocking version)
How to determine the existence of a selenium element in Python
What to do if you get a minus zero in Python
[Cloudian # 9] Try to display the metadata of the object in Python (boto3)
How to check the memory size of a variable in Python
How to get a string from a command line argument in python
I tried to create a list of prime numbers with python
How to check the memory size of a dictionary in Python