Home > other >  Pycharm output without results also remind no errors, but another file can output the result, are un
Pycharm output without results also remind no errors, but another file can output the result, are un

Time:09-22

The import requests
The from bs4 import BeautifulSoup
Num=0
Url="https://movie.douban.com/subject/27140017/comments? Status=P '
The req=requests. Get (url)
Soup=BeautifulSoup (the req. Text, 'LXML')
XML=soup. Find_all (' p 'class_=' ')
For I in range (len (XML) :
[I] MSG=XML string
If not MSG is None:
Num +=1
Print (' first ', num, 'a', MSG)



D: \ pythonw. Exe C:/Users/DELL/u1/unnatural. Py

The process has finished, exit code 0
  • Related