fix WPImport from URL
This commit is contained in:
parent
e74dfc2b73
commit
ed78f22f2e
@ -15,9 +15,10 @@ class WPimport:
|
||||
# Public method
|
||||
|
||||
def fromUrl(self, webpage):
|
||||
for page in webpage:
|
||||
r = requests.get(page)
|
||||
for i in range(0, len(webpage)):
|
||||
r = requests.get(webpage[i])
|
||||
if r.status_code == 200:
|
||||
self._logger.info("({0}/{1} : Page en cours d'import : {2}".format(i+1, len(webpage), webpage[i]))
|
||||
soup = BeautifulSoup(r.content, self._parser)
|
||||
articlebody = soup.find_all("div", class_="articlebody")
|
||||
if len(articlebody) > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user