Organisation class in a folder
This commit is contained in:
parent
05a3a28c6f
commit
7848968fa1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
backup/
|
||||
backup1/
|
||||
web_scrap.log
|
||||
__pycache__/
|
||||
|
@ -3,7 +3,8 @@ from requests.auth import HTTPBasicAuth
|
||||
from getpass import getpass
|
||||
from urllib.parse import urlparse
|
||||
import argparse, logging
|
||||
import WPImport, WPExport
|
||||
from lib.WPImport import WPimport
|
||||
from lib.WPExport import WPExport
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
@ -71,7 +72,7 @@ if __name__ == '__main__':
|
||||
|
||||
basic = HTTPBasicAuth(args.user, password)
|
||||
wordpress = args.wordpress.split(",")
|
||||
importWp = WPImport.WPimport(basic, "", logger, args.parser)
|
||||
importWp = WPimport(basic, "", logger, args.parser)
|
||||
if len(args.file) > 0:
|
||||
for i in wordpress:
|
||||
importWp.setUrl(i)
|
||||
@ -93,11 +94,11 @@ if __name__ == '__main__':
|
||||
importWp.fromDirectory(directory[i])
|
||||
exit(0)
|
||||
if len(args.canalblog) > 0:
|
||||
exportWp = WPExport.WPExport("", logger, args.parser, args.directory)
|
||||
exportWp = WPExport("", logger, args.parser, args.directory)
|
||||
canalblog = args.canalblog.split(",")
|
||||
wordpress = args.wordpress.split(",")
|
||||
|
||||
if serial is False:
|
||||
if args.serial is False:
|
||||
for canal in canalblog:
|
||||
try:
|
||||
o = urlparse(canal)
|
||||
@ -132,7 +133,7 @@ if __name__ == '__main__':
|
||||
|
||||
if args.command == "export":
|
||||
canalblog = args.url.split(",")
|
||||
exportWp = WPExport.WPExport("", logger, args.parser, args.directory)
|
||||
exportWp = WPExport("", logger, args.parser, args.directory)
|
||||
for canal in canalblog:
|
||||
try:
|
||||
o = urlparse(canal)
|
||||
|
0
lib/__init__.py
Normal file
0
lib/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user