アットウィキロゴ

odanjj

import os
import shutil
import requests
 
memo=[]
y1=2
m1=10
for sig in range(60):
 
 
    m1=m1+3
    if m1>12:
        y1=y1+1
        m1=1
 
    d1="0"+str(m1)
    if m1>9:d1=str(m1)
    date="0"+str(y1)
    if y1>9:date=str(y1)
    date=date+d1
 
    r = requests.get('https://artv.info/ar'+date+'.html')
    r.encoding = r.apparent_encoding
    m=r.text
 
    x=m.split("</table>")
    for xx in x:
        x1=xx.split("</tr>")
        a="<td rowspan=\"10\" class=\"left pl5px\">"
        c1=""
        for x2 in x1:
            if a in x2:c1=x2
 
        x3=c1.split("</td>")
        c2=""
        for x4 in x3:
           if a in x4:c2=x4
 
        if a in c2:memo.append(c2)
 
g=open("tv.txt","w",encoding="UTF-8")
for m in memo:
    g.write(m)
 
g.close()  
最終更新:2018年01月31日 11:35