473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Data Parsing Old Website Python no error but no results when running

I am parsing an old state website for a project and I cannot get the python code to work.

I have typed in the code I made back into the developer console and it works perfectly there but in python it just returns:

C:\Python27\python.exe "C:/Users/corinne/PycharmProjects/scc docket/SCC V1.py"
[]

Process finished with exit code 0



The code I have created is:



Expand|Select|Wrap|Line Numbers
  1. from lxml import html
  2. import requests
  3. page = requests.get('http://www.scc.virginia.gov/docketsearch#dailyFilings')
  4. tree = html.fromstring(page.text)
  5.  
  6.  
  7. dailyFilings = tree.xpath('//*[contains(@class,"details-brief")]//td[1]/text()')
  8. print dailyFilings
can anyone please help me??
Nov 5 '15 #1
3 1317
dwblas
626 Expert 512MB
I get a "no module named lxml error". Are you using standard Python? Also some basic debugging should be done first. Print "page" and "tree"to see if those 2 lines are working. Generally I use urllib and BeautifulSoup (or roll my own) so don't know anything about lxml, but maybe someone else will know more.
Nov 6 '15 #2
Thanks for responding!

I'm using JetBrains PyCharm 3.1 Community Edition.

I have never used urlib and BeautifulSoup, are you able to give me a simple example of parsing using those?
Nov 6 '15 #3
dwblas
626 Expert 512MB
A general tutorial http://swordstyle.com/func_test_tuto...tifulsoup.html but depends on what you want from the page. Also look at http://www.pythonforbeginners.com/py...soup-4-python/
Nov 7 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Vineet Jain | last post by:
I'm running a process which uses python numeric arrays extensively and also does some calculations in c. All objects are created in python or through the Numeric library and then passed to the c...
9
by: gov | last post by:
Hi, I've just started to learn programming and was told this was a good place to ask questions :) Where I work, we receive large quantities of data which is currently all printed on large,...
0
by: Michael Groeger | last post by:
Hi, we are currently in development phase of a web application. We have a custom base page and set the Web.config attribute <pages pageBaseType=""/> correctly. As long as we are running only one...
0
by: Uma | last post by:
Dear all, I have a problem while running a smart client application which was installed through CD-ROM. After installing the smart client setup the application is running properly. When running...
0
by: j.rogel | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite...
1
by: cloh | last post by:
I have a form in Access, that has been working fine. But today when I try it, I get an error. The message is: 440: Method 'Run' of object '_Application'' failed Does anyone know what this...
3
by: kbcompany | last post by:
Hi I have just started learning oracle. i have created a table with name imp_master and columns item_code with constraint not null, item_name with constraint n1 not null(n1 is user...
3
by: Ananthu | last post by:
Hi I have created one website named OTMS using ASP.NET in a File System Format.My project location is in F: drive(F:\Project\OTMS). I have installed IIS properly and the website runs properly in...
14
Frinavale
by: Frinavale | last post by:
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one. I have a...
1
by: Amelie Lesser | last post by:
Hello, I'm pretty new to Qt, Python and their combinations. I'm currently writing a QGIS plugin in python (I used QtCreator 2.1 (Qt Designer 4.7) to generate a .ui-file and am now trying to use it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.