<div dir="ltr">Thanks for the help. Could you help me with that because I am having login issues from a couple of stuff I found on the web? Or can you provide me with any helpful links?<div><br></div><div>So far I have looked at these and I keep getting a dummy html page (not related to the bug) instead of the XML page for the bug:</div><div><br></div><div><a href="http://stackoverflow.com/questions/189555/how-to-use-python-to-login-to-a-webpage-and-retrieve-cookies-for-later-usage">http://stackoverflow.com/questions/189555/how-to-use-python-to-login-to-a-webpage-and-retrieve-cookies-for-later-usage</a><br></div><div><a href="http://stackoverflow.com/questions/11167419/get-xml-data-from-bugzilla-url">http://stackoverflow.com/questions/11167419/get-xml-data-from-bugzilla-url</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 3:38 PM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I guess you can just generate that URL from the bug's ID, then use standard<br>
python urllib or similar to fetch the web page contents. I don't think there's<br>
any bugzilla API call that does what you want though<br>
<br>
- Cole<br>
<span class=""><br>
On 01/13/2015 03:35 PM, Ravikumar Patel wrote:<br>
> I'll guide you through the steps I've followed to clarify what I mean. First,<br>
> I queried for all bugs for a specific person. I then got a list of bugs for<br>
> that person with all of their bug IDs. I clicked on one of the bug ID and it<br>
> gave me a page with that bug's summary, status, aliases, product, etc. Once<br>
> you get to the bottom of the page, you have a link to it's XML view/page. (see<br>
> screenshot below)<br>
><br>
</span><span class="">> Inline image 1<br>
><br>
> Now I want to get access to this page (using my python script from previous<br>
> emails):<br>
</span><span class="">> Inline image 3<br>
><br>
> I want to know if I can access this XML page from a corresponding bug ID via a<br>
> python script?<br>
><br>
> Thanks,<br>
> Ravi<br>
><br>
><br>
> On Tue, Jan 13, 2015 at 2:25 PM, Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a><br>
</span><span class="">> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>>> wrote:<br>
><br>
> I don't know what you mean by 'xml page'<br>
><br>
> - Cole<br>
><br>
> On 01/13/2015 02:23 PM, Ravikumar Patel wrote:<br>
> > This is a follow up question. How do I now access each bug's XML page now that<br>
> > I have the bug IDs I needed?<br>
> ><br>
> > On Tue, Jan 13, 2015 at 1:34 PM, Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>><br>
</span><span class="">> > <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>>>> wrote:<br>
> ><br>
> > On 01/13/2015 12:59 PM, Ravikumar Patel wrote:<br>
> > > Hello,<br>
> > ><br>
> > > I am trying to get the bug ID of all bugs from my Bugzilla account. Any<br>
> > > suggestions as to how I am able to do so? Is it possible that to query for all<br>
> > > projects and then access the bug IDs from each project? If so, then how?<br>
> > ><br>
> > > So far my code looks like this:<br>
> > ><br>
> > > |bz = bugzilla.Bugzilla(url='<a href="https://bugzilla.mycompany.com/xmlrpc.cgi" target="_blank">https://bugzilla.mycompany.com/xmlrpc.cgi</a>')<br>
> > > try:<br>
> > > bz.login('<a href="mailto:name@email.com">name@email.com</a> <mailto:<a href="mailto:name@email.com">name@email.com</a>> <mailto:<a href="mailto:name@email.com">name@email.com</a><br>
> <mailto:<a href="mailto:name@email.com">name@email.com</a>>><br>
> > <mailto:<a href="mailto:name@email.com">name@email.com</a> <mailto:<a href="mailto:name@email.com">name@email.com</a>><br>
> <mailto:<a href="mailto:name@email.com">name@email.com</a> <mailto:<a href="mailto:name@email.com">name@email.com</a>>>>', 'password');<br>
> > > print'Authorization cookie received.'<br>
> > > except bugzilla.BugzillaError:<br>
> > > print(str(sys.exc_info()[1]))<br>
> > > sys.exit(1)|<br>
> > ><br>
> > > Here is the link to the stackoverflow question page:<br>
> > > <a href="http://stackoverflow.com/questions/27869663/how-do-i-query-bugzilla-to-get-all-the-bug-ids-using-python-and-xml-rpc" target="_blank">http://stackoverflow.com/questions/27869663/how-do-i-query-bugzilla-to-get-all-the-bug-ids-using-python-and-xml-rpc</a><br>
> > ><br>
> > > I really need help on this. Any suggestions?<br>
> ><br>
> > bugs = bz.query(bz.build_query(assigned_to="your-bugzilla-account"))<br>
> > for bug in bugs:<br>
</span>> > print <a href="http://bug.id" target="_blank">bug.id</a> <<a href="http://bug.id" target="_blank">http://bug.id</a>> <<a href="http://bug.id" target="_blank">http://bug.id</a>><br>
> ><br>
> > - Cole<br>
> ><br>
> ><br>
> ><br>
> ><br>
><br>
><br>
<br>
</blockquote></div><br></div>