#import*
:
Please avoid import
ing all modules at all costs. Import each module you use separately
#Regex ಠ_ಠ
Regex is evil, the worst. seriously. stop it. right now. kill python.exe right now and change it.
You use beautifulsoup, a dom parsing library, literally a few lines later, but you choose to use regex.
You sir, are evil.
I would suggest looking further at beautifulsoup, or taking a look at Scrapy, a scraping library for Python that makes use of generators to scrape large element sets (and even has cloud support!)
#Lisp
Your code reads like lisp.
))
)) )
Seriously, you need to format this better.
Try using Python's style guide, PEP8. when running your code through the online analyser, it threw 20 errors immediately.
When coding good Python, PEP8 should be your goto style document.
#Looping
You shouldn't be looping like this:
print {key: int(value) for key, value in
If you want to reduce the code indentation level, then you should use separate variables to store each step in the process, or just simply use a standard loop.
#String formatting
Instead of using % (myString)
, you should use string.format
, as it's an improvement for these reasons:
- less independant of parameter order
- More readable
"My name is {name}, and I work for {work_name} as a {job_name}".format(name="Batman", work_name="Gotham City", job_name="Crimestopper")
#import*
:
Please avoid import
ing all modules at all costs. Import each module you use separately
#Regex ಠ_ಠ
Regex is evil, the worst. seriously. stop it. right now. kill python.exe right now and change it.
You use beautifulsoup, a dom parsing library, literally a few lines later, but you choose to use regex.
You sir, are evil.
I would suggest looking further at beautifulsoup, or taking a look at Scrapy, a scraping library for Python that makes use of generators to scrape large element sets (and even has cloud support!)
#Lisp
Your code reads like lisp.
))
)) )
Seriously, you need to format this better.
Try using Python's style guide, PEP8. when running your code through the online analyser, it threw 20 errors immediately.
#String formatting
Instead of using % (myString)
, you should use string.format
:
"My name is {name}, and I work for {work_name} as a {job_name}".format(name="Batman", work_name="Gotham City", job_name="Crimestopper")
#import*
:
Please avoid import
ing all modules at all costs. Import each module you use separately
#Regex ಠ_ಠ
Regex is evil, the worst. seriously. stop it. right now. kill python.exe right now and change it.
You use beautifulsoup, a dom parsing library, literally a few lines later, but you choose to use regex.
You sir, are evil.
I would suggest looking further at beautifulsoup, or taking a look at Scrapy, a scraping library for Python that makes use of generators to scrape large element sets (and even has cloud support!)
#Lisp
Your code reads like lisp.
))
)) )
Seriously, you need to format this better.
Try using Python's style guide, PEP8. when running your code through the online analyser, it threw 20 errors immediately.
When coding good Python, PEP8 should be your goto style document.
#Looping
You shouldn't be looping like this:
print {key: int(value) for key, value in
If you want to reduce the code indentation level, then you should use separate variables to store each step in the process, or just simply use a standard loop.
#String formatting
Instead of using % (myString)
, you should use string.format
, as it's an improvement for these reasons:
- less independant of parameter order
- More readable
"My name is {name}, and I work for {work_name} as a {job_name}".format(name="Batman", work_name="Gotham City", job_name="Crimestopper")
#import*
:
Please avoid import
ing all modules at all costs. Import each module you use separately
#Regex ಠ_ಠ
Regex is evil, the worst. seriously. stop it. right now. kill python.exe right now and change it.
You use beautifulsoup, a dom parsing library, literally a few lines later, but you choose to use regex.
You sir, are evil.
I would suggest looking further at beautifulsoup, or taking a look at Scrapy, a scraping library for Python that makes use of generators to scrape large element sets (and even has cloud support!)
#Lisp
Your code reads like lisp.
))
)) )
Seriously, you need to format this better.
Try using Python's style guide, PEP8. when running your code through the online analyser, it threw 20 errors immediately.
#String formatting
Instead of using % (myString)
, you should use string.format
:
"My name is {name}, and I work for {work_name} as a {job_name}".format(name="Batman", work_name="Gotham City", job_name="Crimestopper")