使用包含多个xpath抓取/回显php编码的网站。想知道组织和控制回传到网站的文本的最佳方法。 根据我对php的理解,可能对于最大程度的控制,最好的办法是使用标题创建一个.php
Exception in thread Thread-2:
Traceback (most recent call last):
File "D:\Programma's\Python\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "D:\Programma's\Python\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "G:\test getal.py", line 35, in AanvalVijand
ontimer(Reactie, vSlagtijd)
File "<string>", line 6, in ontimer
File "D:\Programma's\Python\lib\turtle.py", line 3662, in Screen
Turtle._screen = _Screen()
File "D:\Programma's\Python\lib\turtle.py", line 3690, in __init__
TurtleScreen.__init__(self, _Screen._canvas)
File "D:\Programma's\Python\lib\turtle.py", line 985, in __init__
"blank" : Shape("image", self._blankimage())
File "D:\Programma's\Python\lib\turtle.py", line 470, in _blankimage
img = TK.PhotoImage(width=1, height=1)
File "D:\Programma's\Python\lib\tkinter\__init__.py", line 3539, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "D:\Programma's\Python\lib\tkinter\__init__.py", line 3495, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
RuntimeError: main thread is not in main loop
然后创建具有不同名称的其他.php文件。然后,在这个xhtml索引中,使用&lt;&gt;拉入不同的抓取数据。 ?php包含'xpath1.php';?&gt;对于前。
有任何想法,如果这是最好的方法吗?
答案 0 :(得分:0)
做一些测试,我可以证实这很有效。