Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

AttributeError: 'NoneType' object has no attribute 'group' #2

Open
qweaszxcdf opened this issue Jun 9, 2017 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'group' #2

qweaszxcdf opened this issue Jun 9, 2017 · 2 comments

Comments

@qweaszxcdf
Copy link

course_url = "http://www.xuetangx.com/courses/course-v1:TsinghuaX+20440333X+sp/about"

Traceback (most recent call last):
File "xuetangx-dl.py", line 182, in
main(course_url)
File "xuetangx-dl.py", line 102, in main
tab_list[tab.get('id')] = re.search("(.+)", tab.get('title')).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

@Rhilip
Copy link
Owner

Rhilip commented Jun 10, 2017

个人感觉你是参加课程后,未点开课程页面学习过。
xuetangx在第一次打开时候,并不返回真正的页面。所以脚本抓不到。。
(这个问题我遇到过。

如果是这种情况,请重新运行脚本后(这种情况二次运行就可解决),请告知运行情况;
否则,请告知你的其他信息,因为xuetangx的课程只有参加后才能抓取,没法复现。

@qweaszxcdf
Copy link
Author

qweaszxcdf commented Jun 10, 2017

I re-run the script,and here is the output
1.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants