Products Communications Messaging Send and receive multichannel text and media messages in 180+ countries
Products Communications Messaging Send and receive multichannel text and media messages in 180+ countries
環境 MacOS, Linux python v3.4.3 PHP v2.5.0 概要 データの配布が tweetid での配布ということはよくありますが、Twitter のクロールには制限があり、集めるのが面倒であることが多いです。今回は tweetid から tweet を集める方法を紹介します。 使うのはGET statuses/lookupという公式で発表された tweet を1リクエストあたり 100 件もってきてくれるやつです。(詳しいことはわかりません) クロールには Twitter のアカウントが必要 ご存知の方も多いと思いますが Twitter のクロールにはアカウントが必要になります。更にTwitter developersにて以下の4つの情報を入手する必要があります。このあたりは説明が転がっていますので各自集めて下さい。 Consumer Key (API Key)
#!/usr/bin/python #-*- coding:utf8 -*- import os import re import yaml import socket import cookielib from mechanize import Browser from BeautifulSoup import BeautifulSoup yml = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'config.yaml') CONFIG = yaml.load(open(yml)) br = Browser() cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) br.open('https://secure.nicovideo.jp/secure/login_form
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く