Errors Running the example script from the documentation
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Im trying to run the first script found here:
http://robobrowser.readthedocs.io/en/latest/readme.html
(The one that scrapes Genius.com)
And I'm getting the following error + warning:
```
/Users/saulfuhrmann/Computers/VirtualEnviroments/TinderHack/lib/python2.7/site-packages/bs4/__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 9 of the file test_robo.py. To get rid of this warning, change code that looks like this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "html.parser")
markup_type=markup_type))
Traceback (most recent call last):
File "test_robo.py", line 11, in
form['q'].value = 'queen'
TypeError: 'NoneType' object has no attribute '__getitem__'
```
Im using **Python 2.7.10** and my OS is **OS X El Capitan (10.11.4)**
Am I doing something wrong?
Or did Genius.com just changed their interface and the script is not updated?
-- Saul
Contributor guide
Research direction
The failing example is the first script on the linked readme.html page; start by running it and inspecting the form lookup that returns None, then compare it with the current Genius.com markup. Done means the documented example works on the stated Python setup and the parser warning is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100