Comments (6)
@cclauss you're right, I tried u'strings'
and it works, we are closer to Python 3 now!
from house-renting.
https://github.com/kezhenxu94/house-renting/blob/master/crawler/house_renting/items.py#L46-L49 and https://github.com/kezhenxu94/house-renting/blob/master/crawler/house_renting/items.py#L65
In Python 3, you can have a u'string' and an r'string' but a ur'string' is a Syntax Error.
flake8 testing of https://github.com/kezhenxu94/house-renting on Python 3.6.3
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./crawler/house_renting/items.py:46:46: E999 SyntaxError: invalid syntax
minutes_ago = re.compile(ur'.*?(\d+)分钟前.*').search(value)
^
1 E999 SyntaxError: invalid syntax
1
from house-renting.
On Python 2, can we try the following?
- Convert these ur'strings' to r'strings' and see if the code functions as expected and then
- Convert these ur'strings' to u'strings' and see if the code functions as expected
My guess is that one of these will work as expected and the other will not.
from house-renting.
@cclauss now can we say this project is compatible with Python3 and Python2 ?
from house-renting.
It is syntax compatible with both Python 2 and Python 3. However end users might find bugs that we will need to fix. I think we should say that both Python 2 and Python 3 are now supported. That means that as issues are opened, we will try our best to fix them.
from house-renting.
@cclauss Great. I'll consider closing this issue
from house-renting.
Related Issues (20)
- elasticsearch 莫名 exit HOT 9
- 添加可浏览的网页 (Adding browsable webpage)
- 添加单元测试 (Adding unit test)
- elasticsearch 换源 HOT 2
- 运行scrapy crawl lianjia出错 HOT 1
- 城市设置没生效 HOT 4
- 爬取链家的spider 启动失败 HOT 4
- docker启动失败 HOT 2
- 启动docker失败 HOT 2
- Google搜索引擎的搜索技巧足够寻找住房信息 HOT 4
- Kibana 不能正常运行 HOT 18
- Wiki里还需要增加两点ElasticSearch的启动错误说明 HOT 12
- 无法安装和创建服务: invalid volume specification HOT 3
- 用docker启动项目总是连接不上es
- 运行很长时间,一直抓不到数据 HOT 2
- 图片下载错误 HOT 2
- docker-compose启动的容器scrapyd和crawler会立即退出 HOT 4
- ModuleNotFoundError: No module named 'scrapy.conf' HOT 2
- 设置了cities=(深圳,) 但爬出来的都是广州的好像? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from house-renting.