In the addressbook I already made the telephone field unrequired by setting the field is_required to 0 for attribute with the attribute_code "telephone" in the eva_attribute table. I searched for an attribute with the attribute code "country" but I just found "country_id".

(Yea and I already copied the abstract.php into the local code folder and commented out the two if-s in the function _basicCheck(). And I removed the class="required" in edit.phtml and shipping.phtml)

The reason I want to make it not required is because it is blank and even when I found a solution and it showed countries and I pressed "Save Address" the error poped up that "Country is a required field". So a soltuion for making the country drop down work would also be very nice.


Question: Write a python script that goes through the links on a page recursively
Answer: You picked the right tool in BeautifulSoup.  Technically you could do it all do it in one script, but you might want to segment it, because it looks like you'll be dealing with tens of thousands of e-mails, all of which are seperate requests - and that will take a while.

This page is gonna help you a lot, but here's just a little code snippet to get you started.  This gets all of the html tags that are index pages for the e-mails, extracts their href links and appends a bit to the front of the url so they can be accessed directly.

from bs4 import BeautifulSoup
import re
import urllib2
soup = BeautifulSoup(urllib2.urlopen("http://www.419scam.org/emails/"))
tags = soup.find_all(href=re.compile("20......../index\.htm")
links = []
for t in tags:
    links.append("http://www.419scam.org/emails/" + t['href'])


're' is a Python's regular expressions module.  In the fifth line, I told BeautifulSoup to find all the tags in the soup whose href attribute match that regular expression.  I chose this regular expression to get only the e-mail index pages rather than all of the href links on that page.  I noticed that the index page links had that pattern for all of their URLs.

Having all the proper 'a' tags, I then looped through them, extracting the string from the href attribute by doing t['href'] and appending the rest of the URL to the front of the string, to get raw string URLs.

Reading through that documentation, you should get an idea of how to expand these techniques to grab the individual e-mails.