Posts: 35
Joined: Dec 2008
Reputation:
0
exiledx
Skilled Python Coder
Posts: 35
What's the pagesource command? I want to code a 'find' command, for example:
For urls, it's url.find('whateverneeded')=1:
What is it for pagesource? I'm trying to do a command for finding something in the page source.
Posts: 1,747
Joined: Jun 2004
Reputation:
12
blittan
Retired Team-Kodi Member
Posts: 1,747
huh? not sure what you mean, but reading a page into a string is easy using urllib or urllib2
page = urllib2.urlopen('http://python.org/').read()
then you would simply do page.find('whatyouneed') ...
Posts: 35
Joined: Dec 2008
Reputation:
0
exiledx
Skilled Python Coder
Posts: 35
I mean reading the page source, for example, right clicking on a page and clicking view page source in Firefox.
Posts: 1,747
Joined: Jun 2004
Reputation:
12
blittan
Retired Team-Kodi Member
Posts: 1,747
what has that with python programming to do?
please place those questions somewhere else.
this forum is for XBMC usage/support.
Posts: 35
Joined: Dec 2008
Reputation:
0
exiledx
Skilled Python Coder
Posts: 35
Maybe I'm not expressing myself clearly, sorry. I mean, is there a way to have xbmc read the pagesource through python?