[PYTHON] I checked the calendar deleted in Qiita Advent Calendar 2016

I learned that the calendar with this written in Hatena Anonymous Diary was deleted, but apparently there are other calendars that have been deleted. I looked it up.

How to find out

The Advent Calendar page does not have a link to the deleted calendar, so I can't look it up from here, but fortunately there is a list of calendar URLs. I used this because there was a post.

I tried to find out on what day the person who set up the Advent Calendar would enter --Qiita

There are 499 Advent Calendars open to Qiita around 22:00 on Thursday, December 3rd.

That's right.

If you access the URL listed here and it is 404 Not Found, it means that the calendar has been deleted.

I can't check about 500 manually, so I wrote it in Python.

deleted_calendar.py


import re

import requests
import time


def main():

    url = "http://qiita.com/sudoyu/items/0a51593b257f419aeb20.md"
    print(url)
    res = requests.get(url)
    print("status code: {}".format(res.status_code))
    if res.status_code != 200:
        return

    r = re.compile("^\* (.+)$")
    calendar_urls = [m.group(1) for m in map(r.match, res.text.split("\n")) if m]

    deleted_url = []
    for idx, url in enumerate(calendar_urls):
        time.sleep(0.2)
        while True:
            print("({:3d}/{:3d}) {} ... ".format(idx, len(calendar_urls), url), end="", flush=True)
            status_code = requests.head(url).status_code
            print(status_code, flush=True)

            if status_code == 404:
                deleted_url.append(url)
            if status_code in [200, 404]:
                break

            print("retry...")
            time.sleep(30)

    print("--------\ndeleted calendars")
    for url in deleted_url:
        print(url)


if __name__ == "__main__":
    main()

result

18 deleted calendars were found. I looked up the calendar name from the cache of Google search.

--Engineer who can't girlfriend (advent-calendar / 2016 / give_me_kareshi)

If you do a Google search for the character string in parentheses, it will appear at the top, so you can check the contents before deletion in the cache of ▼. Even if the calendar is deleted, the linked posts and blogs seem to remain as they are.

What calendar was deleted

mainly

Qiita is a service for recording and sharing programming knowledge.

It seems that the calendar that does not meet the policy has been deleted.

Neta-types such as "Muscle" and "Kareshi Kanojo" were popular in the subscription ranking, but most of the posts are irrelevant to programming, so it is natural that they will be deleted.

In addition, it seems that the calendars related to engineers such as "Freelance Cruel Story" and "Change of Job" that were judged not to be related to programming were deleted. However, the judgment criteria around here seem to be about, and there are many similar themes that remain without being deleted.

There is also a calendar of the company that caused the problem, but I wonder if this was deleted voluntarily.

Recommended Posts

I checked the calendar deleted in Qiita Advent Calendar 2016
I tried scraping the ranking of Qiita Advent Calendar with Python
I checked the calendar deleted in Qiita Advent Calendar 2016
Lazy advent calendar 2019
Looking back on the transition of the Qiita Advent calendar
Looking back on the transition of the Qiita Advent calendar
I participated in the ISUCON10 qualifying!
I wrote the queue in Python
I wrote the stack in Python
I checked the gift tax amount
I made a command to display a colorful calendar in the terminal
I checked the contents of docker volume
I checked the options of copyMakeBorder of OpenCV
I saved the scraped data in CSV!
I can't get the element in Selenium!
I wrote the sliding wing in creation.
I checked the library for using the Gracenote API
I tried hitting the Qiita API from go
I tried simulating the "birthday paradox" in Python
I tried the least squares method in Python
I checked the list of shortcut keys of Jupyter
I can't enter characters in the text area! ?? !! ?? !! !! ??
I checked the session retention period of django
I wrote the hexagonal architecture in go language
I implemented the inverse gamma function in python
Qiita Job I tried to analyze the job offer
I implemented Human In The Loop ― Part ① Dashboard ―
I want to display the progress in Python!
The Advent calendar has been posted! Notify Slack
I checked the reference speed when using python list, dictionary, and set type in.
Lazy advent calendar 2019
When I checked the query generated by Django, it was issued in large numbers
I tried to graph the packages installed in Python
I checked the output specifications of PyTorch's Bidirectional LSTM
I checked out the versions of Blender and Python
I checked the default OS and shell of docker-machine
I want to write in Python! (3) Utilize the mock
[Note] I can't call the installed module in jupyter
What I learned by participating in the ISUCON10 qualifying
I want to use the R dataset in python
I can't use the darknet command in Google Colaboratory!