XuannLii
XuannLii
The first one: Actually, I found many ways, and I find it seems that 151 line, in communities\visualization\draw_communities.py def _community_patch(vertices): tck, u = splprep(vertices.T, u=None, s=0.0, per=1) lost the key...
refer to this link: https://stackoverflow.com/questions/29934831/matplotlib-draw-spline-from-3-points
Thank you for your reply. I see this: usernum = max(u, usernum)、 itemnum = max(i, itemnum). Does it not mean that the max num in the u[ ] or i[...
您好,我又来了……就是我想获取用户信息中的所在地,用的#72 这个代码,嗯……请问一下应该怎样获取呢? 另外,如果要搜索满足多个关键词的微博,在关键词这个地方应该应该怎么做呢?改为列表?
@dataabc 您好!感谢回复!我还想问: 1、为什么用户昵称可以获取?用户所在地不能获取呢? 2、就是对于多个关键词,我的意思是搜索同时含有keyword1和keyword2这两个关键词的微博,而两个关键词不一定连在一起,"keyword1+keyword2"应该是会直接搜索连在一起的两个关键词吧?
@dataabc 再次感谢!两点我都听懂了,第二点试了一下,也是可以运行的。但是现在出了个问题: Error: 'NoneType' object has no attribute 'xpath' File "D:/pyCharm/weiboSpider-master/weiboSpider.py", line 448, in get_one_page info = selector.xpath("//div[@class='c']") AttributeError: 'NoneType' object has no attribute 'xpath' 请问一下这个是因为操作太频繁了,被限制了吗?
@dataabc 这个我改过了,但是还是这样,然后我又用另一个cookie试了一下,发现还是这样报错……
@dataabc 好的,非常感谢您!我明天再试试
@dataabc 您好,我来反馈一下,就是关于用“keyword1+keyword2”,这个好像并不太行,因为首先速度会受限制,其次爬着爬着会报各种各样的错误……比如: Error: 'NoneType' object has no attribute 'xpath' Traceback (most recent call last): File "D:/pyCharm/weiboSpider-master/weiboSpider.py", line 102, in get_page_num if selector.xpath("//input[@name='mp']") == []: AttributeError: 'NoneType' object has no attribute...
@dataabc 您好。我是设置了starttime和endtime,昨天是进度条有问题,今天……它这个循环是不是不能这样啊?就是天数一天一天地增加,因为如果这样的话,会报错……比如: Traceback (most recent call last): File "D:/pyCharm/weiboSpider-master/weiboSpider.py", line 394, in download_pictures w['original_pictures'].rfind('.'):] AttributeError: 'list' object has no attribute 'rfind' 抱了这个错之后又继续运行,爬了一部分数据,然后又接着报错…… Error: 'NoneType' object has no attribute 'xpath' File...