Sub getdata()
Dim objIE As InternetExplorer
Set objIE = CreateObject("Internetexplorer.Application")
objIE.Visible = True
objIE.navigate "https://www.shogi.or.jp/tsume_shogi/everyday/"
Do While objIE.Busy = True Or objIE.readyState <> 4
DoEvents
Loop
Dim htmldoc As HTMLDocument
Set htmldoc = objIE.document
Call scrape(htmldoc)
Dim lastpg As Long
lastpg = 103
For i = 2 To lastpg
objIE.navigate "https://www.shogi.or.jp/tsume_shogi/everyday/index_" & i & ".html"
Do While objIE.Busy = True Or objIE.readyState <> 4
DoEvents
Loop
Set htmldoc = objIE.document
Call scrape(htmldoc)
Next i
End Sub
Function scrape(ByVal doc As HTMLDocument)
Dim ul As IHTMLElementCollection
Set ul = doc.getElementsByClassName("floatListA01Col3-30 indexListA01 fixHeight section04")
Dim taga As IHTMLElementCollection
Set taga = ul(0).getElementsByTagName("a")
Dim tagp As IHTMLElementCollection
Set tagp = ul(0).getElementsByTagName("p")
For i = 0 To 11
Dim lr As Long
lr = ThisWorkbook.Sheets("data").Cells(Rows.Count, 1).End(xlUp).Row
ThisWorkbook.Sheets("data").Range("A" & lr + 1).Value = tagp(i).innerText
ThisWorkbook.Sheets("data").Range("B" & lr + 1).Value = taga(i).href
Next i
End Function
# alternatives --config mta
There is 1 program that provides 'mta'.
Selection Command
-----------------------------------------------
*+ 1 /usr/sbin/sendmail.postfix
Enter to keep the current selection[+], or type selection number:
そもそもPostfixしか入ってなかった。幸先が悪いが進める。そしたら
-o smtpd_etrn_restrictions=reject
が無い。困った。とりあえず書き足しておいてみる。で、色々やって終わり。あれ?こんなんでいいの?
Dovecotの設定
これも上記リンク見ながらやるけど、起動しか書いてない。。。かつ
service dovecot start
って打っても
Redirecting to /bin/systemctl start dovecot.service
Failed to start dovecot.service: Unit not found.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN] Dovecot ready.
* BYE Disconnected for inactivity.
Connection closed by foreign host.
意味よく分かんないけど、大丈夫な気がする。
ログを見る
vi /var/log/maillog
中身
dovecot: imap-login: Aborted login (no auth attempts in 0 secs):ほにゃらら
と
postfix/smtpd[27083]: warning: SASL authentication failure: Internal Error -4 in server.c near line 1757
postfix/smtpd[27083]: warning: xsasl_cyrus_server_get_mechanism_list: no mechanism available
postfix/smtpd[27083]: fatal: no SASL authentication mechanisms
To get started using the Labs endpoints, standard APIs, premium APIs, enterprise APIs, or Ads APIs, you need to create a developer account and generate keys and tokens.