[Imdbpy-help] Help with tests
Hi, Now that the test skeleton is in the repository (the codename-simplify branch), it would be very helpful if more people could contribute with tests. The testing code is quite simple, here's an example from the person main details page tests: def test_name_should_be_canonical(person_main_details): page = person_main_details('keanu_reeves') data = parser.parse(page)['data'] assert data['name'] == 'Reeves, Keanu' The body of every test function is like that. Get the page, run through the parser, check the result. I have written the functions for getting the movie combined details page and the person main details page. I will add the other types of pages soon or I can add one when anyone needs it. The current tests are here: https://github.com/alberanid/imdbpy/tree/codename-simplify/tests What needs to be done is as follows: 1. Select something that hasn't been tested yet. 2. Select a person (or movie, or company etc) page that can be used to test it. 3. If not already there, add its IMDb id to the relevant dictionary in the conftest.py file (MOVIES, PEOPLE). 4. Figure out the name of the key in the result and write an assert to check for the correct value. Having more tests would increase our confidence in the parsers, especially after the port to Python3. Any contributions would be greatly appreciated. Cheers -- Turgut -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
[Imdbpy-help] HELP IMDbPY
There is an example in the README as follows Example: i = imdb.IMDb(accessSystem='http') m = i.get_movie('0133093') # only default info set are retrieved. m.has_key('demographic') # returns false, since no demographic breakdowns # aren't available by default. i.update(m, info=('vote details',)) # retrieve the vote details info set. print m['demographic'] # print the demographic breakdowns. But by using this example I only get the information about male female aged under 18 and so on. [image: 内嵌图片 1] I want to know can I get the data in the picture below [image: 内嵌图片 2] -- ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
[Imdbpy-help] Help: IMDBPY on AWS RDSMySQL instance
Hi all, I am wondering how I should change the command: imdbpy2sql.py -d /dir/with/plainTextDataFiles/ -u 'mysql://root:root@localhost/imdb' mysql://root:root@localhost/imdb' in order to connect to database “IMDBdatabase” located in AWS RDS MySQL instance. I connect to instance using the following command: mysql -h IMDBdatabase.us-east-1.rds.amazonaws.com -u root -p Thanks for your support, Livan -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
[Imdbpy-help] help running imdbpy2sql
Hi, I am an unexperienced programmer trying to run imdppy2sql.py in order to create a local sql database of imdb's data. Thus far, here is what I have done: 1. Downloaded all the plain text files from imdb into a single directory: /Users/TPF/Desktop/imdb/ 2. Downloaded Mamp and created a mysql database called imdb 3. Downloaded the latest version of sql object by typing svn co http://svn.colorstudy.com/sqlobject/trunk SQLobject into the command line 4. Downloaded the stable version of IMDbPY - 4.8.2 5. Navigated to the IMDbPY folder by typing cd /Users/TPF/Desktop/IMDbPY-4.8.2 into the command line. 6. Entered this into the command line to execute the script: python bin/imdbpy2sql.py -d /Users/TPF/Desktop/imdb/ -u mysql://root:root@localhost:8889/imdb However, this seems to continually return this error: Traceback (most recent call last): File bin/imdbpy2sql.py, line 34, in module from imdb.parser.sql.dbschema import * ImportError: No module named imdb.parser.sql.dbschema Yet, when I navigate to this folder, I see the script dbschema.py in the correct location. I have searched on the internet and suspect that the problem may have to do with my version of SQLobject, Python (2.6.1), or my OS (Mac OSX 10.6.8). However, due to my lack of experience, I am not sure how best to redress these issues or where to start first. Can somebody please help walk me through this? I'd be more than willing to compensate you for your time. All the best, Brian Abelson -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
Re: [Imdbpy-help] help running imdbpy2sql
On Thu, May 24, 2012 at 11:14 PM, Brian Abelson br...@harmony-institute.org wrote: 4. Downloaded the stable version of IMDbPY - 4.8.2 If possible, use the development version: https://bitbucket.org/alberanid/imdbpy/ Traceback (most recent call last): File bin/imdbpy2sql.py, line 34, in module from imdb.parser.sql.dbschema import * ImportError: No module named imdb.parser.sql.dbschema You can't use the downloaded file without installing them. You can try to run, from the main directory of the IMDbPY package, this: python setup.py install it should take care of all the dependencies, provided that you have a working environment to compile the needed libraries and/or that they are pre-packaged for MacOS X (I don't know, since I don't use it). Basically, the point is: - try to install it (it will try to fetch some dependencies and compile some modules) - if some dependency fails, try to satisfy it manually. - if there's no way and/or the compile step stops you, see the options shown by the setup.py file to exclude some pieces of IMDbPY. It would be cool to have an auto-installer for Mac OS X or at least the steps to follow to manage the installation of python modules; is anyone out there expert on the subject? :-) HTH, -- Davide Alberani davide.alber...@gmail.com [PGP KeyID: 0x465BFD47] http://www.mimante.net/ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help
[Imdbpy-help] Help installing on Ubuntu 9.10 Karmic
Hello, I am having a really hard time to install imdbpy, Python Version is 2.6.4 Method 1) pip install IMDbPY just gets prints Downloading/unpacking IMDbPY and it gets stuck (tested for over one hour) using 100% cpu and doing nothing. Method 2) [code start] root@ubuntu:~# easy_install IMDbPY Searching for IMDbPY Reading http://pypi.python.org/simple/IMDbPY/ Reading http://imdbpy.sf.net/ Reading http://imdbpy.sf.net/?page=download Best match: IMDbPY 4.7 Downloading http://prdownloads.sourceforge.net/imdbpy/IMDbPY-4.7.tar.gz Processing IMDbPY-4.7.tar.gz Running IMDbPY-4.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-yh1e46/IMDbPY-4.7/egg-dist-tmp-b3srKA Created locale for: tr en it. warning: no previously-included files matching '*~' found anywhere in distribution no previously-included directories found matching 'CVS' no previously-included directories found matching '.svn' no previously-included directories found matching '.hg' warning: no previously-included files matching 'CVS' found anywhere in distribution warning: no previously-included files matching '.svn' found anywhere in distribution imdb/parser/sql/cutils.c:54:20: error: Python.h: No such file or directory imdb/parser/sql/cutils.c: In function ‘strings_check’: imdb/parser/sql/cutils.c:74: warning: implicit declaration of function ‘strlen’ imdb/parser/sql/cutils.c:74: warning: incompatible implicit declaration of built-in function ‘strlen’ imdb/parser/sql/cutils.c:82: warning: implicit declaration of function ‘strcmp’ imdb/parser/sql/cutils.c: In function ‘ratcliff’: imdb/parser/sql/cutils.c:152: warning: incompatible implicit declaration of built-in function ‘strlen’ imdb/parser/sql/cutils.c: In function ‘strtolower’: imdb/parser/sql/cutils.c:164: warning: incompatible implicit declaration of built-in function ‘strlen’ imdb/parser/sql/cutils.c:164: warning: implicit declaration of function ‘tolower’ imdb/parser/sql/cutils.c: At top level: imdb/parser/sql/cutils.c:169: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token imdb/parser/sql/cutils.c:207: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token imdb/parser/sql/cutils.c:254: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cutils_methods’ imdb/parser/sql/cutils.c: In function ‘initcutils’: imdb/parser/sql/cutils.c:266: warning: implicit declaration of function ‘Py_InitModule’ imdb/parser/sql/cutils.c:266: error: ‘cutils_methods’ undeclared (first use in this function) imdb/parser/sql/cutils.c:266: error: (Each undeclared identifier is reported only once imdb/parser/sql/cutils.c:266: error: for each function it appears in.) ERROR = Aaargh! An error! An error! Curse my metal body, I wasn't fast enough. It's all my fault! Anyway, if you were trying to build a package or install IMDbPY to your system, looks like we're unable to fetch or install some dependencies, or to compile the C module. The best solution is to resolve these dependencies (maybe you're not connected to Internet?) and/or install a C compiler. You may, however, go on without some optional pieces of IMDbPY; try re-running this script with the corresponding optional argument: --without-lxmlexclude lxml (speeds up 'http') --without-cutils don't compile the C module (speeds up 'sql') --without-sqlobject exclude SQLObject (you need at least one of) --without-sqlalchemy exclude SQLAlchemy (SQLObject or SQLAlchemy,) (if you want to access a ) (local SQL database ) --without-sql no access to SQL databases (implied if both --without-sqlobject and --without-sqlalchemy are used) Example: python ./setup.py --without-lxml --without-sql install The caught exception, is re-raise below: error: Setup script exited with error: command 'gcc' failed with exit status 1 [code end] My gcc version is 4.4.1 (Ubuntu 4.4.1-4ubuntu9) Method 3) python ./setup.py install (Fails with the same error) Method 4) The ubuntu package python-imdbpy installs successful but the problem is that I don't have and I cannot find anywhere the script imdbpy2sql.py I found this script in the tar.gz file, but shouldn't this file be copied automatically to somewhere like /usr/local/bin ? I have all the other prerequisites installed such as sqlobject, sqlalchemy and python-mysqldb. -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more