fork download
  1. with open('./'+str(ID)+'.txt','a') as file:
  2. rescount = 0
  3. for line in lines:#スレッドのレスずつに分けている。
  4. #rescount = 0
  5. #print(line+str('\n'))
  6. #ここに文字列検索を入れる。もし、IDが見つかったら、スレタイとURLを記載する。textからIDが見つかったら、記入、改行する。
  7. if line.find(ID) != -1:#IDあった
  8. if rescount == 0:
  9. print(rescount)
  10. file.write(thread_title+str('\b'))
  11. file.write(dat+str('\n'))#スレタイとURLを書く
  12. file.write(line)
  13. print(line)
  14. file.write(str('\n'))
  15. rescount+=1
  16. else:
  17. print('aaaaaaa')
  18. file.write(line)
  19. print(line)
  20. file.write(str('\n'))
  21.  
Runtime error #stdin #stdout #stderr 0.01s 27712KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
  File "./prog.py", line 1
    with open('./'+str(ID)+'.txt','a') as file:
    ^
IndentationError: unexpected indent